浏览代码

fix: Parse octal echo escapes

Found by this eslint issue:

/puter/packages/phoenix/src/puter-shell/coreutils/coreutil_lib/echo_escapes.js
  107:59  error  'hexchars' is not defined  no-undef
Sam Atkins 1 年之前
父节点
当前提交
6ad8f5e06a
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      packages/phoenix/src/puter-shell/coreutils/coreutil_lib/echo_escapes.js

+ 1 - 1
packages/phoenix/src/puter-shell/coreutils/coreutil_lib/echo_escapes.js

@@ -104,7 +104,7 @@ const echo_escapes = {
             caller.output(NUL);
             return;
         }
-        caller.output(String.fromCharCode(Number.parseInt(hexchars, 8)));
+        caller.output(String.fromCharCode(Number.parseInt(octchars, 8)));
     },
     '\\': caller => caller.output('\\'),
 };