On 11 Jan 2008, at 19:24, Greg Ercolano wrote: >> - Greg's tweak to handle file:// prefixes also segfaults. Alvin's >> version works. The difference seems to be that, when passed the >> string: >> file:///path/to/image.jpg >> Greg strips the "file:" off so it becomes >> ///path/to/image.jpg >> which seems to cause OSX some problems. > > Hmm, all unices I've seen treat extra slashes as a single slash, > so I'm not sure that'd be a problem. > > Also, seems odd is that extra slashes would be any kind of cause > of a segfault.
That's what I expected - but my tests on OSX were consistent. > When you ran your test with my tweaks, did you fix the > multibyte_convert() > problem first? That might be the cause of the segfault. Or maybe I > have > a bug somewhere else.. for instance wasn't sure if my use of strcpy() > within a string was valid.. memmove() might be safer, as it > explicitly > allows memory areas to overlap. I have your latest multibyte_convert() in my test code, but it never gets triggered anyway, since the OSX strings seem to be regular ASCII or maybe UTF-8. I "fixed" the crashing by changing the code to strcmp with "file://" and then knock off 7 chars rather than 5, and it all started working, so I *think* that's what the problem is. I don't know if maybe the OSX file handling thinks that "///" means something special... _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

