|
|
|
@ -75,7 +75,9 @@ func deserialise(in io.Reader, init []byte) (*Result, []byte, error) { |
|
|
|
|
for i := 0; i < n2; i++ { |
|
|
|
|
// '\r' is really '\n'
|
|
|
|
|
if data[i] == '\r' { |
|
|
|
|
data[i] = '\n' |
|
|
|
|
data = append(data[:i], data[i+1:]...) |
|
|
|
|
n2-- |
|
|
|
|
continue |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if data[i] == 0x4 { |
|
|
|
@ -83,15 +85,13 @@ func deserialise(in io.Reader, init []byte) (*Result, []byte, error) { |
|
|
|
|
want_output = false |
|
|
|
|
output = data[:i] |
|
|
|
|
data = data[i+1:] |
|
|
|
|
/* |
|
|
|
|
// The TBM gives us our own commands back
|
|
|
|
|
for j := 0; j < len(output); j++ { |
|
|
|
|
if output[j] == '\r' { |
|
|
|
|
if output[j] == '\n' { |
|
|
|
|
output = output[j+1:] |
|
|
|
|
break |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
*/ |
|
|
|
|
break |
|
|
|
|
} else { |
|
|
|
|
errorcode = data[:i] |
|
|
|
|