diff --git a/Makefile b/Makefile index 85b2a7ba..a0e8e819 100644 --- a/Makefile +++ b/Makefile @@ -357,7 +357,7 @@ uninstall: ################# format: - tools/format.sh + sh tools/format.sh grammar: build/janet.tmLanguage build/janet.tmLanguage: tools/tm_lang_gen.janet $(JANET_TARGET) diff --git a/src/core/value.c b/src/core/value.c index 3a071cda..ed66ee11 100644 --- a/src/core/value.c +++ b/src/core/value.c @@ -703,7 +703,7 @@ Janet janet_lengthv(Janet x) { return janet_wrap_number(len); #else if (len < (size_t) JANET_INTMAX_INT64) { - return janet_wrap_number(len); + return janet_wrap_number((double) len); } else { janet_panicf("integer length %u too large", len); } diff --git a/tools/format.sh b/tools/format.sh old mode 100755 new mode 100644 index 37e03f26..57c568cd --- a/tools/format.sh +++ b/tools/format.sh @@ -1,4 +1,4 @@ -#!/usr/bin/env bash +#!/usr/bin/env sh # Format all code with astyle