summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjhurst <jhurst@cinecert.com>2006-04-21 18:10:36 +0000
committerjhurst <>2006-04-21 18:10:36 +0000
commit422c14c3bde38f1ff871ac204d2506c27a5273a4 (patch)
treef27b4443ff8f29d1b14795de26f94c3ab56b92f9 /src
parent9da32166108c11ab6350ae0867952c5727d24fd7 (diff)
Work!
Diffstat (limited to 'src')
-rwxr-xr-xsrc/KM_util.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/KM_util.cpp b/src/KM_util.cpp
index efb94f9..e9157ec 100755
--- a/src/KM_util.cpp
+++ b/src/KM_util.cpp
@@ -58,6 +58,9 @@ static struct map_entry_t s_ResultMap[MapSize];
const Kumu::Result_t&
Kumu::Result_t::Find(long v)
{
+ if ( v == 0 )
+ return RESULT_OK;
+
for ( ui32_t i = 0; s_ResultMap[i].result != 0 && i < MapMax; i++ )
{
if ( s_ResultMap[i].rcode == v )
@@ -73,6 +76,9 @@ Kumu::Result_t::Result_t(long v, const char* l) : value(v), label(l)
{
assert(l);
+ if ( v == 0 )
+ return;
+
if ( ! s_MapInit )
{
s_MapInit = true;
@@ -86,9 +92,10 @@ Kumu::Result_t::Result_t(long v, const char* l) : value(v), label(l)
ui32_t i = 0;
while ( s_ResultMap[i].result != 0 && i < MapMax )
{
- i++;
if ( s_ResultMap[i].rcode == v && s_ResultMap[i].result != 0 )
return;
+
+ i++;
}
assert(i+2 < MapMax);