mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 07:38:48 +00:00
Rename to writeToConsole
This commit is contained in:
Vendored
+3
-3
@@ -1183,7 +1183,7 @@ function odinSetupDefaultImports(wasmMemoryInterface, consoleElement) {
|
|||||||
currentLine[false] = "";
|
currentLine[false] = "";
|
||||||
currentLine[true] = "";
|
currentLine[true] = "";
|
||||||
|
|
||||||
const addConsoleLine = (line, isError) => {
|
const writeToConsole = (line, isError) => {
|
||||||
if (!line) {
|
if (!line) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -1265,10 +1265,10 @@ function odinSetupDefaultImports(wasmMemoryInterface, consoleElement) {
|
|||||||
write: (fd, ptr, len) => {
|
write: (fd, ptr, len) => {
|
||||||
const str = wasmMemoryInterface.loadString(ptr, len);
|
const str = wasmMemoryInterface.loadString(ptr, len);
|
||||||
if (fd == 1) {
|
if (fd == 1) {
|
||||||
addConsoleLine(str, false);
|
writeToConsole(str, false);
|
||||||
return;
|
return;
|
||||||
} else if (fd == 2) {
|
} else if (fd == 2) {
|
||||||
addConsoleLine(str, true);
|
writeToConsole(str, true);
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
throw new Error("Invalid fd to 'write'" + stripNewline(str));
|
throw new Error("Invalid fd to 'write'" + stripNewline(str));
|
||||||
|
|||||||
Reference in New Issue
Block a user