From: Laszlo T. <ave...@us...> - 2007-01-30 19:55:43
|
Update of /cvsroot/gemrb/gemrb/gemrb/plugins/STOImporter In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv1817 Modified Files: STOImp.cpp Log Message: pre-emptive hack to fix 0 stock items Index: STOImp.cpp =================================================================== RCS file: /cvsroot/gemrb/gemrb/gemrb/plugins/STOImporter/STOImp.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** STOImp.cpp 28 Jan 2007 15:56:17 -0000 1.16 --- STOImp.cpp 30 Jan 2007 19:55:25 -0000 1.17 *************** *** 159,162 **** --- 159,167 ---- str->ReadDword( &it->Flags ); str->ReadDword( &it->AmountInStock ); + //if there was no item on stock, how this could be 0 + //we hack-fix this here so it won't cause trouble + if (!it->AmountInStock) { + it->AmountInStock = 1; + } str->ReadDword( (ieDword *) &it->InfiniteSupply ); ieDwordSigned tmp; |