Added some guards against setting an invalid NKI. It just happened!
[rfk-inform.git] / kitten.inf
index e99fd21ccba8b2cb2e5595ddf95ddee25556d5a6..d756519300226bdfa63a0146055888fc42ee99cc 100644 (file)
@@ -819,7 +819,7 @@ Global last_right = false;
 
 [ get_random_msg num;
        num = random(MESSAGE_NUM);
-       while (is_duplicate_msg(num) == true) {
+       while (is_duplicate_msg(num) == true || num > MESSAGE_NUM || num < 1) {
                num = random(MESSAGE_NUM);
        }
        return num;