Codechange: Make GetRegister return a signed integer, matching the underlying TemporaryStorageArray.
This commit is contained in:
@@ -36,7 +36,7 @@
|
||||
/* Get a variable from the persistent storage */
|
||||
case 0x7C: {
|
||||
/* Check the persistent storage for the GrfID stored in register 100h. */
|
||||
uint32_t grfid = GetRegister(0x100);
|
||||
uint32_t grfid = static_cast<uint32_t>(GetRegister(0x100));
|
||||
if (grfid == 0xFFFFFFFF) {
|
||||
if (this->ro.grffile == nullptr) return 0;
|
||||
grfid = this->ro.grffile->grfid;
|
||||
@@ -132,7 +132,7 @@
|
||||
if (this->ro.grffile == nullptr) return;
|
||||
|
||||
/* Check the persistent storage for the GrfID stored in register 100h. */
|
||||
uint32_t grfid = GetRegister(0x100);
|
||||
uint32_t grfid = static_cast<uint32_t>(GetRegister(0x100));
|
||||
|
||||
/* A NewGRF can only write in the persistent storage associated to its own GRFID. */
|
||||
if (grfid == 0xFFFFFFFF) grfid = this->ro.grffile->grfid;
|
||||
|
||||
Reference in New Issue
Block a user