From ba542a1f20ee6813fa95b85cd05512f63a9e3672 Mon Sep 17 00:00:00 2001 From: Uli Kusterer Date: Tue, 12 Aug 2003 04:05:43 +0200 Subject: [PATCH] Fix a stupid, stupid copy & paste error that caused DBYT and DLNG to read the wrong amount of data. --- NuTemplateEditor/NuTemplateDBYTElement.m | 6 +++--- NuTemplateEditor/NuTemplateDLNGElement.m | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/NuTemplateEditor/NuTemplateDBYTElement.m b/NuTemplateEditor/NuTemplateDBYTElement.m index b234a7e..97915f4 100644 --- a/NuTemplateEditor/NuTemplateDBYTElement.m +++ b/NuTemplateEditor/NuTemplateDBYTElement.m @@ -37,7 +37,7 @@ -(void) readDataFrom: (NuTemplateStream*)stream { - [stream readAmount:2 toBuffer: &charValue]; + [stream readAmount:sizeof(charValue) toBuffer: &charValue]; } @@ -65,7 +65,7 @@ -(NSString*) stringValue { - if( [l isEqualToString: @"CHAR"] ) + if( [type isEqualToString: @"CHAR"] ) return [NSString stringWithCString:&charValue length:1]; else return [NSString stringWithFormat: @"%d", charValue]; @@ -74,7 +74,7 @@ -(void) setStringValue: (NSString*)str { - if( [l isEqualToString: @"CHAR"] ) + if( [type isEqualToString: @"CHAR"] ) charValue = [str cString][0]; else { diff --git a/NuTemplateEditor/NuTemplateDLNGElement.m b/NuTemplateEditor/NuTemplateDLNGElement.m index d25ff9f..fb0f9ce 100644 --- a/NuTemplateEditor/NuTemplateDLNGElement.m +++ b/NuTemplateEditor/NuTemplateDLNGElement.m @@ -32,7 +32,7 @@ -(void) readDataFrom: (NuTemplateStream*)stream { - [stream readAmount:2 toBuffer: &longValue]; + [stream readAmount:sizeof(longValue) toBuffer: &longValue]; }