diff -r d7b13805d1e0 -r ae602e667879 parser.cxx --- a/parser.cxx Sat Jul 14 20:35:50 2012 +0300 +++ b/parser.cxx Sat Jul 14 22:03:34 2012 +0300 @@ -175,17 +175,14 @@ } // If we added strings here, we need to write a list of them. - unsigned int stringcount = g_StringTable->Count(); - printf ("Write %u strings\n", stringcount); + unsigned int stringcount = CountStringTable (); if (stringcount) { w->Write (DH_STRINGLIST); w->Write (stringcount); - - for (unsigned int a = 0; a < stringcount; a++) { - printf ("Write string: `%s`\n", g_StringTable->table[a]); - w->WriteString (g_StringTable->table[a]); - } + for (unsigned int a = 0; a < stringcount; a++) + w->WriteString (g_StringTable[a]); } + printf ("%u string%s written\n", stringcount, (stringcount != 1) ? "s" : ""); } void ScriptReader::ParseCommand (CommandDef* comm, ObjWriter* w) { @@ -228,7 +225,7 @@ case RETURNVAL_STRING: MustString(); w->Write (DH_PUSHSTRINGINDEX); - w->Write (g_StringTable->Push (token.chars())); + w->Write (PushToStringTable (token.chars())); break; }