Browse code

bb #5751: cli_scansis return code

David Raynor authored on 2012/09/07 02:52:39
Showing 1 changed files
... ...
@@ -95,11 +95,16 @@ int cli_scansis(int desc, cli_ctx *ctx) {
95 95
   }
96 96
 
97 97
   cli_dbgmsg("SIS: UIDS %x %x %x - %x\n", EC32(uid[0]), EC32(uid[1]), EC32(uid[2]), EC32(uid[3]));
98
-  if (uid[2]==EC32(0x10000419))
98
+  if (uid[2]==le32_to_host(0x10000419)) {
99 99
     i=real_scansis(f, ctx, tmpd);
100
-  else if(uid[0]==EC32(0x10201a7a)) {
100
+  }
101
+  else if(uid[0]==le32_to_host(0x10201a7a)) {
101 102
     i=real_scansis9x(f, ctx, tmpd);
102 103
   }
104
+  else {
105
+    cli_dbgmsg("SIS: UIDs failed to match\n");
106
+    i=CL_EFORMAT;
107
+  }
103 108
 
104 109
   if (!ctx->engine->keeptmp)
105 110
     cli_rmdirs(tmpd);