diff --git a/src/boot/boot.janet b/src/boot/boot.janet index 60b01497..c99939e0 100644 --- a/src/boot/boot.janet +++ b/src/boot/boot.janet @@ -2115,7 +2115,7 @@ (if-let [check (in module/cache fullpath)] check (do - (def loader (module/loaders mod-kind)) + (def loader (if (keyword? mod-kind) (module/loaders mod-kind) mod-kind)) (unless loader (error (string "module type " mod-kind " unknown"))) (def env (loader fullpath args)) (put module/cache fullpath env) diff --git a/src/core/specials.c b/src/core/specials.c index 3ea75b23..650d43b2 100644 --- a/src/core/specials.c +++ b/src/core/specials.c @@ -630,7 +630,7 @@ static JanetSlot janetc_while(JanetFopts opts, int32_t argn, const Janet *argv) janetc_scope(&tempscope, c, JANET_SCOPE_FUNCTION, "while-iife"); /* Recompile in the function scope */ - cond = janetc_value(subopts, argv[0]); + cond = janetc_value(subopts, condform); if (!(cond.flags & JANET_SLOT_CONSTANT)) { /* If not an infinite loop, return nil when condition false */ janetc_emit_si(c, ifjmp, cond, 2, 0);