getobj() was caching 'invent' in 'firstobj', dating from the days of the !GOLDOBJ configuration, and sortloot() could change the value of invent, making firstobj end up pointing somewhere into the midst of the inventory list. So collecting letters of applicable items could miss things (typically right after restoring a saved game). Repeating the command would operate on already sorted invent, making firstobj remain valid and things mysteriously reappear after having been missed before. Just get rid of 'firstobj' since it's no longer useful.
125 KiB
125 KiB