Re: [Warzone-dev] issues with texture radar color loading function

2007-08-03 Thread The Watermelon
On 8/2/07, Per Inge Mathisen [EMAIL PROTECTED] wrote: On 8/2/07, The Watermelon [EMAIL PROTECTED] wrote: 1.the sscanf target buffer in texLoad in texture.c was never incremented by 'j' per loop,so all the tiles will have the first tile's color. Oops. 2.%hh is a C99 feature,so it's not

Re: [Warzone-dev] issues with texture radar color loading function

2007-08-03 Thread Per Inge Mathisen
On 8/3/07, Per Inge Mathisen [EMAIL PROTECTED] wrote: BTW, it is %hhx, not %hh. How does MSVC deal with sscanf on byte sized variables? Surely it must have a way of doing that. This patch seems to work just as well, which I guess that should take care of any problems for MSVC: Index:

Re: [Warzone-dev] issues with texture radar color loading function

2007-08-03 Thread Per Inge Mathisen
On 8/3/07, The Watermelon [EMAIL PROTECTED] wrote: 2.%hh is a C99 feature,so it's not guaranteed to work properly with C89 compiler. I checked MSVC and it gave a stack overflow/corruption error on variable 'b' in runtime check when doing sscanf with %hh. BTW, it is %hhx, not %hh. How

[Warzone-dev] issues with texture radar color loading function

2007-08-02 Thread The Watermelon
1.the sscanf target buffer in texLoad in texture.c was never incremented by 'j' per loop,so all the tiles will have the first tile's color. 2.%hh is a C99 feature,so it's not guaranteed to work properly with C89 compiler. the patch attached should fix the 2 problems listed,though it might not be

Re: [Warzone-dev] issues with texture radar color loading function

2007-08-02 Thread Per Inge Mathisen
On 8/2/07, The Watermelon [EMAIL PROTECTED] wrote: 1.the sscanf target buffer in texLoad in texture.c was never incremented by 'j' per loop,so all the tiles will have the first tile's color. Oops. 2.%hh is a C99 feature,so it's not guaranteed to work properly with C89 compiler. I would like