summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 20613bc)
raw | patch | inline | side by side (parent: 20613bc)
author | Gert van Valkenhoef <g.h.m.van.valkenhoef@rug.nl> | |
Mon, 14 Nov 2011 11:33:14 +0000 (11:33 +0000) | ||
committer | Gert van Valkenhoef <g.h.m.van.valkenhoef@rug.nl> | |
Mon, 14 Nov 2011 11:33:14 +0000 (11:33 +0000) |
reader.cc | patch | blob | history |
diff --git a/reader.cc b/reader.cc
index a57e9bebefc50265d0b11cc48160d5c85e9cb3c8..ffca53deacab5f2a2cfa280b6107ee0e5b23371a 100644 (file)
--- a/reader.cc
+++ b/reader.cc
char *bufPtr = (char *)&buf;
d_rider.read(bufPtr, 2);
if (isLittleEndian()) {
- return buf;
+ return buf - 0x8000;
} else {
CHAR out;
char *outPtr = (char *)&out;
outPtr[0] = bufPtr[1]; outPtr[1] = bufPtr[0];
- return out;
+ return out - 0x8000;
}
}
void Reader::readLChar(CHAR *buf, size_t len) {
+ for (int i = 0; i < len; ++i) {
+ buf[i] = readLChar();
+ }
+ /*
char *bufPtr = (char *)buf;
int len2 = len * 2;
d_rider.read(bufPtr, len2);
bufPtr[i + 1] = tmp;
}
}
+ */
}
BYTE Reader::readByte() {