Index: class.c ================================================================== --- class.c +++ class.c @@ -321,11 +321,11 @@ valid_part_of_code((c>>16)&0xFF); if((c>>16)!=p) { if(o+(c>>24)>=0x1FFB) ParseError("Converted string too long\n"); memset(tokenstr+o,0xFE,x=(c>>24)+1); o+=x; - tokenstr[o++]=c>>16; + tokenstr[o++]=p=c>>16; } tokenstr[o++]=c>>8; tokenstr[o++]=c; } } tokenstr[o]=0; @@ -2880,11 +2880,13 @@ case OP_MISC7: define_user_flags(0x1060,0x107F); break; case OP_COLLISIONLAYERS: define_user_flags(0x1080,0x1087); break; case OP_CODEPAGE: nxttok(); if(tokent!=TF_INT || tokenv<1 || tokenv>0x7FFFFF) ParseError("Number from 1 to 8388607 expected\n"); +#ifndef CONFIG_OMIT_MBCS if(tokenv==460800 || tokenv==954) has_mbcs=1; +#endif set_code_page(tokenv); nxttok(); if(tokent!=TF_CLOSE) ParseError("Expected close parenthesis\n"); break; case OP_ORDER: