]> skyeroc.xyz Git - dgamelaunch/commitdiff
Fix virus crash
authorPasi Kallinen <paxed@alt.org>
Mon, 21 May 2012 14:32:50 +0000 (17:32 +0300)
committerPasi Kallinen <paxed@alt.org>
Mon, 21 May 2012 14:32:50 +0000 (17:32 +0300)
virus.c

diff --git a/virus.c b/virus.c
index 469173cb6af298a8a0f5f9eb659b13edc434947b..2742df91a3fe112cc21037a6bbb1d1fa92a18125 100644 (file)
--- a/virus.c
+++ b/virus.c
@@ -1178,6 +1178,7 @@ do_cmd (Byte c)
       // user changed mind and erased the "/"-  do nothing
       break;
     case 'N':                  // N- backward search for last pattern
+      if (last_search_pattern == 0) break;
       if (cmdcnt-- > 1)
         {
           do_cmd (c);