Mercurial > hg > early-roguelike
annotate srogue/rdk.h @ 276:4573b355cdc1
UltraRogue: prevent bad array accesses in call().
Marking non-magic items caused segfaults because item_color was set to
NULL.  item_type could also be used as an out-of-bounds index.  These
problems have been fixed by only using these variables when the mark
argument is false, in which case they are properly initialized.
A fall-through case statement was also fixed.
| author | John "Elwin" Edwards | 
|---|---|
| date | Sun, 10 Sep 2017 21:04:22 -0400 | 
| parents | 2128c7dc8a40 | 
| children | 
| rev | line source | 
|---|---|
| 36 
2128c7dc8a40
Import Super-Rogue 9.0 from the Roguelike Restoration Project (r1490)
 elwin parents: diff
changeset | 1 /* | 
| 
2128c7dc8a40
Import Super-Rogue 9.0 from the Roguelike Restoration Project (r1490)
 elwin parents: diff
changeset | 2 * Super-Rogue | 
| 
2128c7dc8a40
Import Super-Rogue 9.0 from the Roguelike Restoration Project (r1490)
 elwin parents: diff
changeset | 3 * Copyright (C) 1984 Robert D. Kindelberger | 
| 
2128c7dc8a40
Import Super-Rogue 9.0 from the Roguelike Restoration Project (r1490)
 elwin parents: diff
changeset | 4 * All rights reserved. | 
| 
2128c7dc8a40
Import Super-Rogue 9.0 from the Roguelike Restoration Project (r1490)
 elwin parents: diff
changeset | 5 * | 
| 
2128c7dc8a40
Import Super-Rogue 9.0 from the Roguelike Restoration Project (r1490)
 elwin parents: diff
changeset | 6 * See the file LICENSE.TXT for full copyright and licensing information. | 
| 
2128c7dc8a40
Import Super-Rogue 9.0 from the Roguelike Restoration Project (r1490)
 elwin parents: diff
changeset | 7 */ | 
| 
2128c7dc8a40
Import Super-Rogue 9.0 from the Roguelike Restoration Project (r1490)
 elwin parents: diff
changeset | 8 | 
| 
2128c7dc8a40
Import Super-Rogue 9.0 from the Roguelike Restoration Project (r1490)
 elwin parents: diff
changeset | 9 extern bool My_term, /* user specied terminal */ | 
| 
2128c7dc8a40
Import Super-Rogue 9.0 from the Roguelike Restoration Project (r1490)
 elwin parents: diff
changeset | 10 extern int _tty_ch; /* channel with tty on it */ | 
