mirror of
https://github.com/mikedilger/chorus.git
synced 2026-05-03 06:51:42 +00:00
Fix indexing issue (since outpos was 0 it wasn't actually a bug yet)
This commit is contained in:
parent
fc939a530e
commit
8b2342e388
@ -56,7 +56,8 @@ impl WebSocketService {
|
|||||||
verify_char(input, b'"', &mut inpos)?;
|
verify_char(input, b'"', &mut inpos)?;
|
||||||
let (inlen, outlen) = json_unescape(&input[inpos..], &mut self.buffer[outpos..])?;
|
let (inlen, outlen) = json_unescape(&input[inpos..], &mut self.buffer[outpos..])?;
|
||||||
inpos += inlen;
|
inpos += inlen;
|
||||||
let subid = unsafe { String::from_utf8_unchecked(self.buffer[outpos..outlen].to_owned()) };
|
let subid =
|
||||||
|
unsafe { String::from_utf8_unchecked(self.buffer[outpos..outpos + outlen].to_owned()) };
|
||||||
outpos += outlen;
|
outpos += outlen;
|
||||||
verify_char(input, b'"', &mut inpos)?; // FIXME: json_unescape should eat the closing quote
|
verify_char(input, b'"', &mut inpos)?; // FIXME: json_unescape should eat the closing quote
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user