Also allow q at the Itemized billing -prompt
authorPasi Kallinen <paxed@alt.org>
Sat, 25 Apr 2015 09:56:51 +0000 (12:56 +0300)
committerPasi Kallinen <paxed@alt.org>
Sat, 25 Apr 2015 09:56:55 +0000 (12:56 +0300)
Original change via AceHack by Alex Smith

src/shk.c

index 9a8ed96cdadc69c1e40b0248c0bf7f97de75340e..c26e15a5c1db87870ea220c0e686193f7a6ba559 100644 (file)
--- a/src/shk.c
+++ b/src/shk.c
@@ -1349,6 +1349,7 @@ proceed:
        /* now check items on bill */
        if (eshkp->billct) {
            register boolean itemize;
+           int iprompt;
             umoney = money_cnt(invent);
            if (!umoney && !eshkp->credit) {
                You("%shave no money or credit%s.",
@@ -1366,7 +1367,9 @@ proceed:
 
            /* this isn't quite right; it itemizes without asking if the
             * single item on the bill is partly used up and partly unpaid */
-           itemize = (eshkp->billct > 1 ? yn("Itemized billing?") == 'y' : 1);
+           iprompt = (eshkp->billct > 1 ? ynq("Itemized billing?") : 'y');
+           itemize = (iprompt == 'y');
+           if (iprompt == 'q') goto thanks;
 
            for (pass = 0; pass <= 1; pass++) {
                tmp = 0;