mystickdreamer

Untitled

Nov 21st, 2021
951
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.97 KB | None | 0 0
  1.   for (j = 0; j < NUM_OBJ_VAL_POSITIONS; j++)
  2.     t[j] = 0;
  3.  
  4.   if ((retval = sscanf(line, "%d %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d", t, t + 1, t + 2, t + 3, t + 4, t + 5, t + 6, t + 7, t + 8, t + 9, t + 10, t + 11, t + 12, t + 13, t + 14, t + 15)) > NUM_OBJ_VAL_POSITIONS) {
  5.     log("SYSERR: Format error in second numeric line (expecting <=%d args, got %d), %s", NUM_OBJ_VAL_POSITIONS, retval, buf2);
  6.     exit(1);
  7.   }
  8.  
  9.   for (j = 0; j < NUM_OBJ_VAL_POSITIONS; j++)
  10.     GET_OBJ_VAL(obj_proto + i, j) = t[j];
  11.  
  12.  
  13.   if (!get_line(obj_f, line)) {
  14.     log("SYSERR: Expecting third numeric line of %s, but file ended!", buf2);
  15.     exit(1);
  16.   }
  17.   if ((retval = sscanf(line, "%d %d %d %d %d", t, t + 1, t + 2, t + 3, t + 4)) != 5) {
  18.     if (retval == 3) {
  19.       t[3] = 0;
  20.       t[4] = 0;
  21.     } else if (retval == 4)
  22.       t[4] = 0;
  23.     else {
  24.       log("SYSERR: Format error in third numeric line (expecting 5 args, got %d), %s", retval, buf2);
  25.       exit(1);
  26.     }
  27.   }
Advertisement
Add Comment
Please, Sign In to add comment