mirror of
https://github.com/yuzu-emu/liftinstall
synced 2024-11-23 19:53:48 +00:00
Fix usage of wrong streaming buffer in frontend
This commit is contained in:
parent
b32e9f6f33
commit
d4dd3fb182
1 changed files with 4 additions and 6 deletions
|
@ -77,14 +77,12 @@ function stream_ajax(path, callback, successCallback, failCallback, data) {
|
||||||
|
|
||||||
req.onreadystatechange = function() {
|
req.onreadystatechange = function() {
|
||||||
if(req.readyState > 2) {
|
if(req.readyState > 2) {
|
||||||
var newData = req.responseText.substr(req.seenBytes);
|
buffer += req.responseText.substr(req.seenBytes);
|
||||||
|
|
||||||
buffer += newData;
|
|
||||||
|
|
||||||
var pointer;
|
var pointer;
|
||||||
while ((pointer = newData.indexOf("\n")) >= 0) {
|
while ((pointer = buffer.indexOf("\n")) >= 0) {
|
||||||
var line = newData.substring(0, pointer).trim();
|
var line = buffer.substring(0, pointer).trim();
|
||||||
newData = newData.substring(pointer + 1);
|
buffer = buffer.substring(pointer + 1);
|
||||||
|
|
||||||
if (line.length === 0) {
|
if (line.length === 0) {
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Reference in a new issue