[svn:parrot] r46914 - trunk/src
NotFound at svn.parrot.org
NotFound at svn.parrot.org
Sun May 23 15:31:26 UTC 2010
Author: NotFound
Date: Sun May 23 15:31:25 2010
New Revision: 46914
URL: https://trac.parrot.org/parrot/changeset/46914
Log:
fix flags disassembly
Modified:
trunk/src/debug.c
Modified: trunk/src/debug.c
==============================================================================
--- trunk/src/debug.c Sun May 23 13:05:55 2010 (r46913)
+++ trunk/src/debug.c Sun May 23 15:31:25 2010 (r46914)
@@ -2481,8 +2481,7 @@
" :unused040",
" :optional",
" :opt_flag",
- " :named",
- NULL
+ " :named"
};
@@ -2503,7 +2502,7 @@
/* Add flags, if we have any. */
{
- int flag_idx = 0;
+ unsigned int flag_idx = 0;
int flags = sig_value;
/* End when we run out of flags, off the end of flag_names, or
@@ -2511,10 +2510,12 @@
* 100 is just an estimate of all buf lengths added together.
*/
while (flags && idx < sizeof (buf) - 100) {
- const char * const flag_string
- = (specialop == 2 && STREQ(flag_names[flag_idx], " :flat"))
+ const char * const flag_string =
+ flag_idx < (sizeof flag_names / sizeof (char *))
+ ? (specialop == 2 && STREQ(flag_names[flag_idx], " :flat"))
? " :slurpy"
- : flag_names[flag_idx];
+ : flag_names[flag_idx]
+ : (const char *) NULL;
if (! flag_string)
break;
More information about the parrot-commits
mailing list