Author Topic: Why mods break in debug builds explained!  (Read 1299 times)

0 Members and 1 Guest are viewing this topic.

Offline Kazan

  • PCS2 Wizard
  • 212
  • Soul lives in the Mountains
    • http://alliance.sourceforge.net
Why mods break in debug builds explained!
The table parser is _much_ stricter - do not deviate from table specs anywhere and this won't happen


perhaps using debug builds are a great way to check your table syntax
PCS2 2.0.3 | POF CS2 wiki page | Important PCS2 Threads | PCS2 Mantis

"The Mountains are calling, and I must go" - John Muir

 

Offline Kazan

  • PCS2 Wizard
  • 212
  • Soul lives in the Mountains
    • http://alliance.sourceforge.net
Why mods break in debug builds explained!
FYI: Absolutely DO NOT use semicolons in XSTRs - semicolons in tables are an PARSER DIRECTIVE - all text on a line following a semicolon (;) is a comment and this will break the parser if a ; is in an XSTR



oh.. XSTRs have a maximum length to.. maybe we should look it up/raise it -- it's somewhere over 1k! but if you violate it code gets overwritten in memory.. cra****y crash


*cough*wc saga*cough*
« Last Edit: October 09, 2003, 12:46:42 pm by 30 »
PCS2 2.0.3 | POF CS2 wiki page | Important PCS2 Threads | PCS2 Mantis

"The Mountains are calling, and I must go" - John Muir

 

Offline mikhael

  • Back to skool
  • 211
  • Fnord!
    • http://www.google.com/search?q=404error.com
Why mods break in debug builds explained!
Quote
Originally posted by Kazan
oh.. XSTRs have a maximum length to.. maybe we should look it up/raise it -- it's somewhere over 1k! but if you violate it code gets overwritten in memory.. cra****y crash


Um. Shouldn't the XSTR's strlen() be checked on parse and truncated if its going to overflow the buffer? It seems like such a simple, brain dead thing to fix.
[I am not really here. This post is entirely a figment of your imagination.]

 

Offline Kazan

  • PCS2 Wizard
  • 212
  • Soul lives in the Mountains
    • http://alliance.sourceforge.net
Why mods break in debug builds explained!
one would think so... but *shrug* .. maybe there was a semicolon in it and i didn't notice and it just _looked_ like it was due to being about 3K in length
PCS2 2.0.3 | POF CS2 wiki page | Important PCS2 Threads | PCS2 Mantis

"The Mountains are calling, and I must go" - John Muir