I can not figure out what is wrong with this cycle.
byte[] b = writeLen(command); long retLen = b.length + command.length() + 1; byte[] ret = new byte[retLen]; print(b.length); for (i = 0; i < b.length; i++) { print(i); ret[i] = b[i]; } print("^"); When executed, the script cannot exit the for loop. The output of the command is as follows:
6 * 1 0 0 0 0 0 and to infinity zeros.
The six and the asterisk are derived from the WriteLen procedure before leaving it. Unit - length b. And a miracle happens in the cycle - the counter remains unchanged.