changeset 65:2537585c2b93

Fix a possible typo in the code.
author Matti Hamalainen <ccr@tnsp.org>
date Mon, 26 Sep 2011 09:47:41 +0300
parents 2badfa44a37a
children 794b7bb40d7f
files src/editobj.cc
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/editobj.cc	Mon Sep 26 09:45:28 2011 +0300
+++ b/src/editobj.cc	Mon Sep 26 09:47:41 2011 +0300
@@ -138,13 +138,16 @@
     sprintf(prompt, "Enter a %s number between 0 and %d%c",
             GetObjectTypeName(objtype),
             GetMaxObjectNum(objtype), allownone ? ',' : ':');
+
     maxlen = 40;                // Why 40 ? -- AYM 2002-04-17
-    if (strlen(prompt) > maxlen);
-    maxlen = strlen(prompt);
+
+    if (strlen(prompt) > maxlen)
+        maxlen = strlen(prompt);
     if (strlen(msg1) > maxlen)
         maxlen = strlen(msg1);
     if (strlen(msg2) > maxlen)
         maxlen = strlen(msg2);
+
     int ya = 0 + BOX_BORDER + WIDE_VSPACING;
     int yb = ya;
     if (allownone)