[Bf-committers] Re: [Bf-blender-cvs] CVS commit:
blender/source/blender/blenlib/intern util.c
Ken Hughes
khughes at pacific.edu
Wed Nov 2 04:50:02 CET 2005
Stephane SOPPERA wrote:
>
>> elubie (Andrea Weikert) 2005/11/01 21:25:23 CET
>>
>> Modified files:
>> blender/source/blender/blenlib/intern util.c
>> Log:
>> Fix for item #3316 : make sure that BLI_make_file_string converts all
>> slashes in the filenames to the system preferred direction.
>> Leaving unix slashes caused the error in the Python module
>> blender.Get('filename')
>>
>> Revision Changes Path
>> 1.29 +5 -1 blender/source/blender/blenlib/intern/util.c
>>
>> <http://projects.blender.org/viewcvs/viewcvs.cgi/blender/source/blender/blenlib/intern/util.c.diff?r1=1.28&r2=1.29&cvsroot=bf-blender>
>>
>>
>>
>
> This modification make my scons-vc7 build (on windowsXPhome) crash when
> starting blender.
>
>
> The call stack is:
> 00 009317fc 0000002f 0000005c blender!BLI_char_switch(unsigned char *
> string = 0x009317fc "/locale", unsigned char from = 0x2f '/', unsigned
> char to = 0x5c '\')+0x29 (FPO: [Non-Fpo]) (CONV: cdecl)
> [c:\blender\blender\source\blender\blenlib\intern\util.c @ 645]
> 01 009317f4 00000a28 00a7fef8 blender!BLI_clean(unsigned char * path =
> 0x009317f4 ".blender/locale")+0x32 (FPO: [Non-Fpo]) (CONV: cdecl)
> [c:\blender\blender\source\blender\blenlib\intern\util.c @ 634]
> 02 00931804 0158c78c 00a7fef8 blender!BLI_make_file_string(unsigned char
> * relabase = 0x00931804 "/", unsigned char * string = 0x0158c78c
> "C:\blender\blender\.blender\.blender\locale", unsigned char * dir =
> 0x00a7fef8 "C:\blender\blender\.blender", unsigned char * file =
> 0x009317f4 ".blender/locale")+0x1a2 (FPO: [Non-Fpo]) (CONV: cdecl)
> [c:\blender\blender\source\blender\blenlib\intern\util.c @ 733]
> 03 7ffd9000 0158c788 00000000 blender!FTF_TTFont::FTF_TTFont(void)+0xc9
> (FPO: [Non-Fpo]) (CONV: thiscall)
> [c:\blender\blender\source\blender\ftfont\intern\ftf_ttfont.cpp @ 119]
> 04 0158016c 0012fd98 00478ed0 blender!_FTF_GetFont(void)+0x49 (FPO:
> [Non-Fpo]) (CONV: cdecl)
Phooey; Forgot about passing constant strings to BLI_make_file_string().
Line 119 in source\blender\ftfont\intern\ftf_ttfont.cpp:
BLI_make_file_string("/", messagepath, BLI_gethome(),".blender/locale");
Strange that the earlier "BLI_char_switch(file, '\\', '/');" doesn't
cause a problem. Guess the string is already in *nix format at that
time. We assumed that if it was modifying the string already, it was OK
to modify it again.
Ken
More information about the Bf-committers
mailing list