mirror of
https://github.com/nickshanks/ResKnife.git
synced 2024-12-21 11:29:31 +00:00
Fix a stupid, stupid copy & paste error that caused DBYT and DLNG to read the wrong amount of data.
This commit is contained in:
parent
f6a79de127
commit
ba542a1f20
@ -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
|
||||
{
|
||||
|
@ -32,7 +32,7 @@
|
||||
|
||||
-(void) readDataFrom: (NuTemplateStream*)stream
|
||||
{
|
||||
[stream readAmount:2 toBuffer: &longValue];
|
||||
[stream readAmount:sizeof(longValue) toBuffer: &longValue];
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user