Permalink
Browse files

Borg: prevent crash on checking item with no inscription

Signed-off-by: Peter Denison <angband@marshadder.org>
  • Loading branch information...
1 parent 85004df commit 944e6756fc60eaa90fffa51150294b5960ebab9a @pnd10 pnd10 committed Nov 14, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/borg/borg4.c
View
@@ -976,8 +976,8 @@ static void borg_notice_aux2(void)
if (!item->iqty) continue;
/* Does the borg need to get an ID for it? */
- if (strstr(item->note, "magical") || strstr(item->note, "special") ||
- strstr(item->note, "ego") ||streq(item->note, "splendid") ||streq(item->note, "excellent")) my_need_id ++;
+ if (item->note && (strstr(item->note, "magical") || strstr(item->note, "special") ||
+ strstr(item->note, "ego") ||streq(item->note, "splendid") ||streq(item->note, "excellent"))) my_need_id ++;
/* Hack -- skip un-aware items */
if (!item->kind) continue;

0 comments on commit 944e675

Please sign in to comment.