Two crash fixes reported on the forums are hopefully fixed.

This commit is contained in:
SecretsOTheP
2013-03-20 10:46:09 -04:00
parent 925ba2199e
commit 56825e9ed0
10 changed files with 24 additions and 14 deletions
+2 -1
View File
@@ -3015,7 +3015,8 @@ ENCODE(OP_ReadBook) {
eq->window = emu->window;
OUT(type);
eq->invslot = 0; // Set to hard 0 since it's not required for the structure to work
memcpy(eq->txtfile, emu->booktext, sizeof(eq->txtfile));
if(sizeof(emu->booktext) > 0 && sizeof(emu->booktext) < 8194)
strncpy(eq->txtfile, emu->booktext, sizeof(eq->txtfile));
FINISH_ENCODE();
}