Quote:
Originally posted by Unregistered Max,
was there a reason why you choosen CString over std::string? *curious* |
Yep. The std::string provided with g++ 2.95 is thread unsafe, but it only can be demonstrated on a SMP box (which I do have). So I had to write my own string. The other reason why my string is somewhat similar to MFC's CString is because I'm comming from the win32 world.
Quote:
Btw, maybe you want to add a "parachute" to your TString::format() code: if there is '%n' in the format string (fmt) better don't evaluate the expression. Since you can't verify the argument types feeded on runtime, this could be exploited (by accident). Nobody really needs unsafe %n. Hope it helps. |
Good idea, however, I never use %n. But I did get few crashes (not with mutella) because of typing %n instead of %d.
Cheers
--Max