Home » U++ Library support » U++ Core » BUG? or Not BUG? LoadFile(filename) and then getting wrong data
BUG? or Not BUG? LoadFile(filename) and then getting wrong data [message #33441] |
Sat, 06 August 2011 10:58 |
silverx
Messages: 62 Registered: March 2011
|
Member |
|
|
I am try to write a hex viewer, and I am using the following to get the data in from the file.
String mfileinfo = LoadFile(fs);
Then I am using
thebyte = mfileinfo[i];
Where i just counts through 1 byte at a time the data on the file.
I have tried with thebyte being defined as int unsigned, int, and char, and when it encounters a hex byte of C3 in the input file it gives the value as -61, also when it comes to a C8 it gives a -56 as the value for thebyte.
When C3 should return 195, and the C8 should return 200.
Why am I getting the what I think is the wrong value for those bytes? How do I get it to return the correct value?
Is this a BUG, problem with LoadFile? Should I use some other way to load the data into the program?
Thanks
David
|
|
|
Goto Forum:
Current Time: Wed Apr 17 23:33:11 CEST 2024
Total time taken to generate the page: 0.02039 seconds
|