Game Development Community

Torque 3D 1.0.1 Bug: TSShapeConstructor sequence load bug & fix - RESOLVED

by Konrad Kiss · in Torque 3D Professional · 11/19/2009 (12:12 pm) · 10 replies

In TSShapeConstructor::_onLoad the following will not work with paths that contain a space character - the shape will fail to load the sequence:

char* split = dStrchr(fileBuf, ' ');
      char* split2 = dStrchr(fileBuf, 't');

A quick fix:

char* split = dStrrchr(fileBuf, ' ');
      char* split2 = dStrrchr(fileBuf, 't');


#1
11/19/2009 (12:19 pm)
thanks Konrad.
#2
11/19/2009 (12:21 pm)
You're welcome! :)
#3
11/19/2009 (12:40 pm)
Lol, I was about to say what change?.
Got it. :)
#4
11/19/2009 (12:54 pm)
Ok,now T3D crashed at start with this fix.
strrchr gets the last ' ', strchr gets the first ' '.
So now i learned a lesson : "do not use space for names" :)
#5
11/19/2009 (12:59 pm)
Do you have the \ in your code? When I posted, the \ seemed to disappear from in front of the "\t". I've fixed it now, but it might have been still wrong when you've read the post. Sorry about that. That code displaying thing acts weirdly sometimes.
#6
11/19/2009 (1:01 pm)
Yes, I just confirmed it that editing your post will remove backslash characters.
#7
11/19/2009 (1:04 pm)
It works now,thanks!
The forum sometimes behaves wrong,i've seen not only dissapearing chars,but whole threads. :)
#8
11/19/2009 (1:06 pm)
Ah ... I was just about to say ... issues and crash.

Backslash munching pages eh...
#9
11/19/2009 (1:10 pm)
You guys are quick with applying fixes! It only took me like 5 mins to realize and fix that missing backslash, and yet.. :)
#10
11/19/2009 (1:17 pm)
Yay, fixed and working backslahes!

Normally I slap code changes in immediately (a la now) but I've had a few non-essential fixes waiting around for recompile - and suddenly thought; "crap, I hope that was an error with this new fix, 'cos it'll be a helluva hunt through all of those other previous changes I've made".

From now on I think I'll add the date next to my //yorks changed this comments, so I know what order I do things in.