more order of operations fixes

This commit is contained in:
DarthArgus
2015-10-13 01:08:19 -05:00
parent 266ac3ec3a
commit a2da3759be
2 changed files with 10 additions and 4 deletions
@@ -18,9 +18,12 @@ class CTServiceCharacter
target[0] = 0;
return;
}
int offset = 0;
while (offset < length && (target[offset++] = source[offset]));
target[length-1] = 0;
while (offset < length && (target[(offset+1)] = source[offset])) {
target[length-1] = 0;
offset++;
}
}
public:
enum { CHARACTER_SIZE=64, CHARACTER_BUFFER, REASON_SIZE=4096, REASON_BUFFER };
@@ -17,9 +17,12 @@ class CTServiceServer
target[0] = 0;
return;
}
int offset = 0;
while (offset < length && (target[offset++] = source[offset]));
target[length-1] = 0;
while (offset < length && (target[(offset+1)] = source[offset])) {
target[length-1] = 0;
offset++;
}
}
public:
enum { SERVER_SIZE=64, SERVER_BUFFER, REASON_SIZE=4096, REASON_BUFFER };