Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Borg: prevent crash on checking item with no inscription

Signed-off-by: Peter Denison <angband@marshadder.org>
  • Loading branch information...
commit 944e6756fc60eaa90fffa51150294b5960ebab9a 1 parent 85004df
@pnd10 pnd10 authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 src/borg/borg4.c
View
4 src/borg/borg4.c
@@ -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;
Please sign in to comment.
Something went wrong with that request. Please try again.