mirror of
https://github.com/mikedilger/chorus.git
synced 2026-01-03 06:15:33 +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)?;
|
||||
let (inlen, outlen) = json_unescape(&input[inpos..], &mut self.buffer[outpos..])?;
|
||||
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;
|
||||
verify_char(input, b'"', &mut inpos)?; // FIXME: json_unescape should eat the closing quote
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user