mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-27 04:00:42 +00:00
fixed undefined end of list behavior of iterators
Also fixed a few warnings
This commit is contained in:
parent
f4c79161ad
commit
c2828fe2e3
3 changed files with 10 additions and 5 deletions
|
@ -1567,10 +1567,10 @@ void trPlayerCtrlGiveStuff(XSPRITE* pXSource, PLAYER* pPlayer, TRPLAYERCTRL* pCt
|
|||
case 1: // give N weapon and default ammo for it
|
||||
case 2: // give just N ammo for selected weapon
|
||||
if (weapon <= 0 || weapon > 13) {
|
||||
Printf(PRINT_HIGH, "Weapon #%d is out of a weapons range!");
|
||||
Printf(PRINT_HIGH, "Weapon #%d is out of a weapons range!", weapon);
|
||||
break;
|
||||
} else if (pXSource->data2 == 2 && pXSource->data4 == 0) {
|
||||
Printf(PRINT_HIGH, "Zero ammo for weapon #%d is specified!");
|
||||
Printf(PRINT_HIGH, "Zero ammo for weapon #%d is specified!", weapon);
|
||||
break;
|
||||
}
|
||||
switch (weapon) {
|
||||
|
|
|
@ -529,7 +529,7 @@ bool FScanner::ScanString (bool tokens)
|
|||
LastGotLine = Line;
|
||||
|
||||
// In case the generated scanner does not use marker, avoid compiler warnings.
|
||||
marker;
|
||||
// marker;
|
||||
#include "sc_man_scanner.h"
|
||||
LastGotToken = tokens;
|
||||
return return_val;
|
||||
|
|
|
@ -20,7 +20,7 @@ public:
|
|||
int NextIndex()
|
||||
{
|
||||
int n = next;
|
||||
next = nextspritestat[next];
|
||||
if (n >= 0) next = nextspritestat[next];
|
||||
return n;
|
||||
}
|
||||
|
||||
|
@ -61,7 +61,12 @@ public:
|
|||
int NextIndex()
|
||||
{
|
||||
int n = next;
|
||||
next = nextspritesect[next];
|
||||
if (n >= 0) next = nextspritesect[next];
|
||||
return n;
|
||||
}
|
||||
|
||||
int PeekIndex()
|
||||
{
|
||||
return next;
|
||||
}
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue