]> granicus.if.org Git - nethack/commitdiff
improperly terminated quest message
authorcohrs <cohrs>
Tue, 27 Aug 2002 03:56:28 +0000 (03:56 +0000)
committercohrs <cohrs>
Tue, 27 Aug 2002 03:56:28 +0000 (03:56 +0000)
Add a missing check to makedefs so it prints a warning about misplaced %Es.
Fix a couple places in quest.txt pointed out by the new warning.
There's no visible effect on play, since the code that actually reads the
message keeps reading until the next %C.

dat/quest.txt
include/qtext.h
util/makedefs.c

index 963a603d973cb573d612899b01222af340645583..1ae167cefd9f4622b4af97092b49521c741701bf 100644 (file)
@@ -2658,7 +2658,6 @@ bad influences on your actions.  Remember, only by following the %a
 path can you hope to overcome the obstacles you will face."
 %E
 %Cc Tou 00021
-%E
 "You have indeed proven yourself a worthy %c, %p.
 
 "But now your kinfolk and I must ask you to put aside your travels and
@@ -2673,6 +2672,7 @@ and recover %o.
 "Do not be distracted on your quest.  If you do not return quickly I fear
 that all will be lost.  Let us both pray now that %d will guide you
 and keep you safe."
+%E
 %Cp Tou 00025
 "Do not be fooled by the false promises of %n."
 %E
@@ -3153,7 +3153,6 @@ in ruins and simplify the task of %n.
 truly ready for this quest.  May %d guide you in this task."
 %E
 %Cc Wiz 00021
-%E
 "Yes, %p, you truly are ready for this dire task.  Listen,
 carefully, for what I tell you now will be of vital importance.
 
@@ -3176,6 +3175,7 @@ shall soon perish.
 find and overcome %n, and return %o to me.
 
 "Go now, with %d, and complete this quest before it is too late."
+%E
 %Cp Wiz 00025
 "Beware, for %n is immune to most magical attacks."
 %E
index 9ac4f16d6107a943a9281b509de01bbd37287997..28ff0bf62bb859a64a68b4724d0ea8257cd81b1f 100644 (file)
@@ -35,6 +35,7 @@ struct        qthdr {
 #define CREC_IN_MSG    "Control record encountered during message - line %d\n"
 #define DUP_MSG                "Duplicate message number at line %d\n"
 #define END_NOT_IN_MSG "End record encountered before message - line %d\n"
+#define TEXT_NOT_IN_MSG        "Text encountered outside message - line %d\n"
 #define UNREC_CREC     "Unrecognized Control record at line %d\n"
 #define OUT_OF_HEADERS "Too many message types (line %d)\nAdjust N_HDR in qtext.h and recompile.\n"
 #define OUT_OF_MESSAGES "Too many messages in class (line %d)\nAdjust N_MSG in qtext.h and recompile.\n"
index 7d89288416f015517a41c24fd63e36e84459e6e1..21e09ae3ab86ade884fed104d0980790539cd25d 100644 (file)
@@ -1511,6 +1511,9 @@ static void
 do_qt_text(s)
        char *s;
 {
+       if (!in_msg) {
+           Fprintf(stderr, TEXT_NOT_IN_MSG, qt_line);
+       }
        curr_msg->size += strlen(s);
        return;
 }