shithub: choc

Download patch

ref: f7bf1488d8d3f728770b6d54d7a4e126b9cdb310
parent: 09baf6c488e70bb2089ec585ab13595a1b64d5c0
author: Simon Howard <fraggle@gmail.com>
date: Wed May 24 15:08:58 EDT 2006

Only allow digits to be typed in number input boxes.

Subversion-branch: /trunk/chocolate-doom
Subversion-revision: 522

--- a/textscreen/txt_inputbox.c
+++ b/textscreen/txt_inputbox.c
@@ -170,7 +170,7 @@
         inputbox->editing = 0;
     }
 
-    if (isprint(key))
+    if (isdigit(key))
     {
         // Add character to the buffer