Browse Source

objects: add BUGFIX for AddShrine (#2272)

pull/5295/head
Robin 4 years ago committed by GitHub
parent
commit
f074a33cc1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      Source/objects.cpp

6
Source/objects.cpp

@ -1438,6 +1438,12 @@ void AddShrine(int i)
#else
int j;
#endif
// BUGFIX: the seed of shrine objects (object[i]._oRndSeed) was never
// initialized. This lead to undefined behaviour, as the shrine object would
// use whatever value was present in memory (often the seed of an object with
// the same object index of a previous dungeon level).
object[i]._oPreFlag = TRUE;
for (j = 0; j < NUM_SHRINETYPE; j++) {
if (currlevel < shrinemin[j] || currlevel > shrinemax[j]) {

Loading…
Cancel
Save