Commit graph

11 commits

Author SHA1 Message Date
Daniel Gibson
477252308d Fix date/time handling in idParser::ExpandBuiltinDefine()
this was so broken, I think if anyone ever tried to use __DATE__ or
__TIME__ it must've crashed, either from free(curtime) (which was the
return value of ctime()) or from things like token[7] = NULL when token
was a pointer (to a single element!).

I think it could work now.

Also fixed potential memory leaks in cases that don't "return" anything
2023-01-05 09:07:04 +01:00
Daniel Gibson
279a40a981 Fix -Wformat-security warnings - thanks James Addison!
This is based on https://github.com/dhewm/dhewm3/pull/500
by https://github.com/jayaddison

See also https://github.com/blendogames/quadrilateralcowboy/pull/4
2023-01-05 04:45:34 +01:00
Daniel Gibson
1de6ab0d50 Fix some compiler warnings (wrong types, superfluous checks, printf-fuckup) 2015-09-27 18:12:16 +02:00
Tobias Frost
73fa334c2a Fixing some spelling errors: s/unkown/unknown, s/seperate/separate. (#107) 2015-02-25 22:01:00 +01:00
Daniel Gibson
0d27bfe7b9 Remove usage of long type from idlib/
Apart from some minor stuff, this changes the signature of some methods
of Parser and Token classes and of the (unused) Random2 class.
That no problem though, because the calling code uses normal ints
anyway.
2012-06-28 13:02:45 +02:00
dhewg
736ec20d4d Untangle the epic precompiled.h mess
Don't include the lazy precompiled.h everywhere, only what's
required for the compilation unit.
platform.h needs to be included instead to provide all essential
defines and types.
All includes use the relative path to the neo or the game
specific root.
Move all idlib related includes from idlib/Lib.h to precompiled.h.
precompiled.h still exists for the MFC stuff in tools/.
Add some missing header guards.
2011-12-19 23:21:47 +01:00
dhewg
3f5c14ef5f Fix -Wunused-but-set-variable warnings
variable set but not used

Removes some CollisionModel code under _DEBUG which was probably a
leftover, since it was completely useless (its done later anyways).
2011-12-10 15:36:04 +01:00
dhewg
9d97eefb1a Fix -Wwrite-strings warnings
deprecated conversion from string constant to ‘char*’

Constify lots of "char *".
2011-12-10 15:36:00 +01:00
dhewg
79ad905e05 Fix all whitespace errors
Excluding 3rd party files.
2011-12-10 15:35:54 +01:00
dhewg
ff493f6847 Fix quoting in GPL headers 2011-12-10 15:34:48 +01:00
Timothee 'TTimo' Besset
fb1609f554 hello world 2011-11-22 15:28:15 -06:00