Guest User

Untitled

a guest
Jan 21st, 2019
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. public int Check(string buffer, int i, string st)
  2. {
  3. if (state != st) return 0;
  4. if (i <= last_index) return 0;
  5. eNka.ResetMachine();
  6. int result = eNka.StartEngines(buffer[i]);
  7. if (result == -1) return -1;
  8. if (result == 1) return 1;
  9. int j = i + 1;
  10. for (; j < buffer.Length && (result = eNka.StartEngines(buffer[j])) == 0; j++);
  11. last_index = j;
  12. if (result == -1) return -1;
  13. else return j - i + 1;
  14. }
Add Comment
Please, Sign In to add comment