On Fri, Oct 5, 2007 at 10:50 PM, via RT Paul Cochrane
<[EMAIL PROTECTED]> wrote:

>  In src/debug.c:PDB_cond() there is the todo item:
>
>  /* XXX Does /this/ have to do with the fact that PASM registers used to
>   * have
>   * maximum of 2 digits? If so, there should be a while loop, I think.
>   */

The attached patch use strtoul instead of itoa to solve this issue.

-- 
Salu2
Index: src/debug.c
===================================================================
--- src/debug.c	(revisión: 27351)
+++ src/debug.c	(copia de trabajo)
@@ -744,18 +744,12 @@
     }
 
     /* get the register number */
-    condition->reg = (unsigned char)atoi(++command);
+    {
+    char * nxtcommand;
+    condition->reg= strtoul(command, &nxtcommand, 10);
+    command= nxtcommand;
+    }
 
-    /* the next argument might have no spaces between the register and the
-     * condition. */
-    command++;
-
-    /* RT#46121 Does /this/ have to do with the fact that PASM registers used to have
-     * maximum of 2 digits? If so, there should be a while loop, I think.
-     */
-    if (condition->reg > 9)
-        command++;
-
     if (*command == ' ')
         skip_command(command);
 

Reply via email to