mirror of
https://github.com/yuzu-emu/liftinstall.git
synced 2024-11-22 22:35:37 +01:00
Fix usage of wrong streaming buffer in frontend
This commit is contained in:
parent
b32e9f6f33
commit
d4dd3fb182
@ -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 New Issue
Block a user