Commit graph

613 commits

Author SHA1 Message Date
Zack Middleton
c7500bb28e Don't segfault in FS_CreatePath when there are no path seperators 2015-07-12 20:06:24 -05:00
Zack Middleton
2e904141ff Make more vm_x86 macros use braces so they work with if blah run macro
MASK_REG in EmitMovEDXStack would incorrectly emit asm if 'andit' was 0.
'andit' would never be 0 though so it wasn't causing issues.

Found by Coverity.
2015-07-12 19:11:13 -05:00
Zack Middleton
ee2541efee Fix range checks for numBorders in CM_AddFacetBevels
Found by Coverity.
2015-07-12 18:39:54 -05:00
Zack Middleton
6a03817a9c Merge pull request #4 from smcv/hurd
Add support for the GNU/Hurd architecture
2015-06-30 19:02:46 -05:00
Martin Michlmayr
ebb69f699c Add support for Aarch64 (ARM64)
Add support for Aarch64, the 64-bit ARM architecture.
2015-06-30 14:22:49 -04:00
/dev/humancontroller
c52e35bcd8 fix a stupid use of strcpy()
strcpy() arguments may not overlap !
2015-06-18 17:24:50 -05:00
Zack Middleton
10c5f0b5a9 Merge pull request #116 from smcv/system-minizip
Enhancements for system libraries
2015-04-12 19:56:37 -05:00
/dev/humancontroller
1ce8ba0cdb Fix return values in nested system calls from QVMs
When the engine is compiled with Clang it appears that the return value
is being written to the WRONG address, either due to the vm_ variables being
changed (unexpectedly) elsewhere, or as a result of bad assembly assumptions;
having a stack variable pointing to where to write the return value seems
to do the trick.

This fixes the case where, for a trap_Register()-like call, weird numbers
are being returned when, during the process, an error message is printed
(which in Tremulous results in a QVM call and (nested) system call).
2015-03-23 20:17:07 -05:00
/dev/humancontroller
c4a2836269 Fix Com_RandomBytes weak-random case
255 is valid for unsigned char too.
2015-03-20 18:50:58 -05:00
Simon McVittie
caf08fdb7b unzip: comment why there is no USE_INTERNAL_MINIZIP boolean option
Bug: https://github.com/ioquake/ioq3/pull/116
2015-03-18 17:38:10 +00:00
Zack Middleton
1ff28f2389 Merge pull request #22 from zturtleman/cvar_modified
Add cvar_modified command
2015-01-07 19:48:16 -06:00
Tim Angus
f83334d81b Add facility to describe cvars 2014-09-26 14:29:51 +01:00
Tim Angus
43b21055b8 Actually, that's not suppressing, that's changing behaviour 2014-09-01 13:07:08 +01:00
Tim Angus
eeaf0227f7 Suppress warning of (deliberate) null pointer deference 2014-09-01 11:19:57 +01:00
Tim Angus
621a72e698 Fix a few warnings 2014-08-30 17:29:23 +01:00
Pan7
18e08125dd Add ColorIndexForNumber macro replacing '& 0x07'
Makes it easier to add more colors.
2014-08-28 20:09:37 -05:00
/dev/humancontroller
7b866ae96d guard against out-of-bounds jump table targets 2014-07-31 03:56:29 -05:00
Zack Middleton
5c1091b414 Fix SkipRestOfLine going past end of string
If string data starts with a 0 (string terminator), don't skip over it at p++.

Not causing any problems in ioq3 as far as I know.
2014-06-17 21:31:29 -05:00
Zack Middleton
077ab4cbd1 Fix OOB access in CM_EdgePlaneNum without erroring in CM_GridPlane
I changed warning to error in 9d74227559,
which broke JA's mp/ctf4 map and probably others.
2014-05-25 23:03:42 -05:00
Zack Middleton
9d74227559 Fix potential out of bounds access caused by CM_GridPlane
Coverity doesn't care if there is a warning, out of bounds access is bad.
2014-05-25 15:59:09 -05:00
Zack Middleton
67d9ecd070 Fix FS_FOpenFileReadDir non-zero file handle when file not found in pk3
If a pk3 search path is passed to FS_FOpenFileReadDir, a non-zero
file handle is returned if file is not found. This causes incorrect
behavior in FS_ReadFileDir (when a pk3 search path is passed in)
which only checks file handle, not length, for seeing if file exists.

I don't know of any issues in ioq3 caused by this.
2014-03-18 20:49:52 -05:00
Tequila
baca82d64e Bunch of comment fixes 2014-03-13 02:20:54 +01:00
Zack Middleton
37de879211 Add cvar_modified command
Based on cvarlist command, it only lists modified cvars.
2013-12-01 23:16:51 -06:00
SmileTheory
6f3edb20b8 #6069: Remove md4 model support. 2013-11-29 16:13:47 -08:00
Zack Middleton
baf5737779 Remove function prototypes for non-existant Sys_* DLL functions 2013-11-08 18:44:04 -06:00
Zack Middleton
028f0f1ac4 Remove old comment that FS_Seek doesn't work on zipped files 2013-11-08 18:43:48 -06:00
Zack Middleton
2d45e57068 Support FS_SEEK_END and negative offset for zipped files in FS_Seek
Use FS_SEEK_END in sound code instead of working around it.
If FS_SEEK_SET and going to current position, just return.
2013-11-08 18:43:34 -06:00
Zack Middleton
c69db4a400 Remove unused variable baseOffset from fsh[] 2013-11-08 18:43:20 -06:00
Zack Middleton
90c98c90a3 Fix VM FOpenFile( FS_READ ) files seeking twice in FS_Seek 2013-11-08 18:42:56 -06:00
Zack Middleton
fd4cd6612d Fix running if built on OS X 10.9
strncpy with in == out causes signal 6 if built on OS X 10.9.
(If built on older OS X versions, the game works on 10.9 though.)

It was happening in COM_StripExtension during map load.
2013-11-06 22:23:40 -06:00
Zack Middleton
6b13806066 Fix getting servers from and being listed on id's q3 master server
Use q3 master protocol when com_gamename is Quake3Arena (the default), otherwise use dpmaster protocol.
2013-07-07 16:31:36 -05:00
Zack Middleton
1315d62491 Make COM_ParseWarning report starting line number of multi-line tokens
COM_ParseWarning use to show last line number of multi-line string tokens, now shows starting line number.
2013-06-03 22:35:57 -05:00
Zack Middleton
3ec2b02dce Check for shaders without closing brace
Shaders without closing brace can eat shaders in other files.
Pass depth to SkipBracedSection instead of reparsing text as it messed up parse line numbers.
2013-06-02 21:55:19 -05:00
Zack Middleton
c0a21d0898 Fix setting COM_Parse current line number
Fix initial off-by-one error.
Count lines in /* */ comments and multi-line strings.
Fix counting some lines twice if text has Unix newlines.
2013-06-02 21:21:45 -05:00
/dev/humancontroller
120e296a74 fix some OOB enumerator usages
(should be no-op with usual compiler workings)
2013-05-30 15:48:49 -05:00
/dev/humancontroller
9e9d6fa52c clean up return statements a bit more 2013-05-30 15:43:21 -05:00
/dev/humancontroller
9d626b6a12 drop some useless return statements 2013-05-30 15:43:21 -05:00
/dev/humancontroller
8cc817b5a3 remove some redundant exit() calls 2013-05-30 15:41:18 -05:00
/dev/humancontroller
830d93aa38 add some noreturn annotations 2013-05-30 15:39:22 -05:00
/dev/humancontroller
2d54a12615 fix some "\n"-related stuff
add missing "\n"s to some Printf()-like calls (in Rend2)
drop erroneous "\n"s from some Error()-like calls (in Rend2)
drop erroneous "\n" from a Com_Error() call (in vm_sparc.c)
2013-05-30 15:32:44 -05:00
Svante Signell
540e4225cc Add support for the GNU/Hurd architecture
[As with GNU/kFreeBSD, it's treated as "Linux": all three use the GNU libc
and runtime linker, which is mostly what matters for ioquake3. -smcv]

Bug-Debian: http://bugs.debian.org/679330
Reviewed-by: Simon McVittie <smcv@debian.org>
2013-05-19 21:50:40 +01:00
Harley Laue
1b2a6abed9 Rename FS_CheckFilenameIsNotImmutable to ..IsMutable 2013-04-24 14:45:37 -05:00
Zack Middleton
6c88bf8aee Rename FS_CheckFilenameIsNotExecutable to ..NotImmutable 2013-04-24 14:14:13 -05:00
Zack Middleton
936db459ee Don't allow modifying qvms or pk3s
Exception for allowing pk3s to be downloaded.
2013-04-24 14:11:18 -05:00
Zack Middleton
b95d8a91aa Fix referencing pk3 with only qagame QVM 2013-04-22 16:21:46 -05:00
Zack Middleton
a7317ac0d5 Add fallback for __func__ (ioq3 isn't compiled as c99 by default)
Using Debian gcc version 4.7.2 and clang 3.0-6.1 anyway.
2013-04-20 21:28:21 -05:00
Zack Middleton
0f62a565f9 Fix setting CVAR_VM_CREATED flag on user created cvars
Fix setting CVAR_VM_CREATED flag on cvars created using set[asu] commands (including archived cvars from cfg) and trap_Cvar_Set.

trap_Cvar_Register called Cvar_Get which cleared CVAR_USER_CREATED flag, but CVAR_VM_CREATED wasn't set because the cvar already existed.
2013-04-06 01:06:34 -05:00
Tim Angus
98360bcd57 Fix some of the things clang --analyze flagged 2013-03-26 16:50:03 +00:00
Tim Angus
8d70929d12 Ditch 'historical compatibility' and use 'logic' instead 2013-03-22 11:33:27 +00:00
Zack Middleton
9bfff1363e Fix NET_IPSocket and NET_IP6Socket return type
It was causing a warning on Windows x64.
2013-03-18 16:04:53 -05:00