Fix off-by-one error in currently not very useful dedicated server text console input

git-svn-id: https://svn.eduke32.com/eduke32@7046 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2018-10-07 05:23:48 +00:00
parent 3689f9c70c
commit 59214a2d78

View file

@ -487,7 +487,7 @@ static void G_SE40(int32_t smoothratio)
{ {
SE40backupStat[i] = sector[i].ceilingstat; SE40backupStat[i] = sector[i].ceilingstat;
SE40backupZ[i] = sector[i].ceilingz; SE40backupZ[i] = sector[i].ceilingz;
if (!ror_protectedsectors[i] || (ror_protectedsectors[i] && sp->lotag == 41)) if (!ror_protectedsectors[i] || sp->lotag == 41)
{ {
sector[i].ceilingstat = 1; sector[i].ceilingstat = 1;
sector[i].ceilingz += newz; sector[i].ceilingz += newz;
@ -509,7 +509,7 @@ static void G_SE40(int32_t smoothratio)
{ {
SE40backupStat[i] = sector[i].floorstat; SE40backupStat[i] = sector[i].floorstat;
SE40backupZ[i] = sector[i].floorz; SE40backupZ[i] = sector[i].floorz;
if (!ror_protectedsectors[i] || (ror_protectedsectors[i] && sp->lotag == 41)) if (!ror_protectedsectors[i] || sp->lotag == 41)
{ {
sector[i].floorstat = 1; sector[i].floorstat = 1;
sector[i].floorz = +newz; sector[i].floorz = +newz;
@ -6704,7 +6704,7 @@ MAIN_LOOP_RESTART:
if (ch != '\n') if (ch != '\n')
buf[bufpos++] = ch; buf[bufpos++] = ch;
if (ch == '\n' || bufpos >= sizeof(buf)) if (ch == '\n' || bufpos >= sizeof(buf)-1)
{ {
buf[bufpos] = 0; buf[bufpos] = 0;
OSD_Dispatch(buf); OSD_Dispatch(buf);