Update os.c

This commit is contained in:
blueloveTH 2026-08-05 23:41:56 +08:00
parent 5546291c91
commit 7435251873

View File

@ -48,6 +48,7 @@ static bool os_chdir(int argc, py_Ref argv) {
}
static bool os_getcwd(int argc, py_Ref argv) {
PY_CHECK_ARGC(0);
char buf[1024];
if(!platform_getcwd(buf, sizeof(buf))) return OSError("getcwd() failed");
py_newstr(py_retval(), buf);