Fix a stupid, stupid copy & paste error that caused DBYT and DLNG to read the wrong amount of data.

This commit is contained in:
Uli Kusterer 2003-08-12 04:05:43 +02:00
parent f6a79de127
commit ba542a1f20
2 changed files with 4 additions and 4 deletions

View File

@ -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
{

View File

@ -32,7 +32,7 @@
-(void) readDataFrom: (NuTemplateStream*)stream
{
[stream readAmount:2 toBuffer: &longValue];
[stream readAmount:sizeof(longValue) toBuffer: &longValue];
}