



Using the YesOrNo() function consecutively, garbage input results in the
"Please answer yes or no.>" prompt being repeated until a valid "yes" or "no" is entered. However, if one types "no" at the first prompt, then just presses
Enter at the second prompt, the game treats this as if "no" was entered
and moves on to the next question. To get YesOrNo() to repeat the question, add a condition around the 3
existing lines in verblibm.h The condition should be (parse->1) for Z-code, and (parse-->0) for glulx.
About Patches
Issue L61029
Bad defaults on YesOrNo()
Submitted by: Paul O'Brian, Andrew Plotkin
Appeared in: Library 6/10 or before
Fixed in: Library 6/11
Problem
Solution
if (parse->1) { ! condition added
i=parse-->1;
if (i==YES1__WD or YES2__WD or YES3__WD) rtrue;
if (i==NO1__WD or NO2__WD or NO3__WD) rfalse;
} ! end of condition.
Last updated 2 May 2008. The librarian in charge of this page is Roger Firth. Please email any comments, suggestions or corrections to roger@firthworks.com.