Commit a6cc24353df9f95340aa242a1e4439401bd77f7b

Authored by David René
1 parent 41be36e9

fix the insensitive compare issue

Showing 1 changed file with 5 additions and 3 deletions   Show diff stats
anubis_dev/vm/src/syscall.cpp
... ... @@ -230,10 +230,12 @@ ci_decl(syscall)
230 230 stack. The result of the comparison (a boolean) is put into MAM(m_R). */
231 231 case sc_string_less:
232 232 {
233   - if (strcasecmp(((char *)(*(MAM(m_SP)-1)))+4,((char *)(*(MAM(m_SP)-2)))+4) < 0)
234   - MAM(m_R) = 1;
235   - else
  233 +
  234 + if (strcasecmp(((char *)(*(MAM(m_SP)-1)))+4,((char *)(*(MAM(m_SP)-2)))+4) == 0)
236 235 MAM(m_R) = 0; /* strcasecmp returns 0 if the strings are equal => false */
  236 + else
  237 + MAM(m_R) = 1;
  238 +
237 239 }
238 240 MAM(m_IP) += 1+2;
239 241 return;
... ...