Re: [AD] unicode.c

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]



>> However, I have noted that line 312 of unicode.c is as follows:
>> 
>>    int c = *((unsigned char *)((*s)++));
>> 
>> this appears to cause a seg fault a bit later in the code that calls
>> utf8_getx. My observation is that changing the line to:
>> 
>>    int c = (int)(*((unsigned char *)((*s)++)));
>
>I'm pretty sure that this crash is bogus, because those lines are identical 
>in meaning, and I'm quite confident of the correctness of that code. My 
>guess is that something else is going wrong, most likely due to you trying 
>to use the X code, and this just happens to be the point where it crashes.

sorry, my bug report was not clear.

It crashes in line 1137 of get_config_text, the immediately after returning
from utf8_getx. Furthermore, a local variable in get_config_text is,
according to gdb, corrupted by the call to ugetx.

As far as I can see, all this happens before any X stuff is done.

I don't like the solution either; it is probably covering over something
else.

Neil



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/