diff --git a/source/toy_value.c b/source/toy_value.c index 49b6650..5ad3ddb 100644 --- a/source/toy_value.c +++ b/source/toy_value.c @@ -374,7 +374,10 @@ Toy_String* Toy_stringifyValue(Toy_Bucket** bucketHandle, Toy_Value value) { //find the decimal, if it exists unsigned int decimal = 0; - while (decimal != length && buffer[decimal] != '.') decimal++; + while (decimal != length && buffer[decimal] != '.' && buffer[decimal] != ',') decimal++; //'.' and ',' supports more locales + + //locales are hard, sorry! + if (decimal != length && buffer[decimal] == ',') buffer[decimal] = '.'; //wipe the trailing zeros while(decimal != length && buffer[length-1] == '0') buffer[--length] = '\0'; diff --git a/source/toy_vm.c b/source/toy_vm.c index 978c28d..56c7630 100644 --- a/source/toy_vm.c +++ b/source/toy_vm.c @@ -630,7 +630,7 @@ static void processIndex(Toy_VM* vm) { } else { Toy_error("Incorrect number of elements found in index"); - //URGENT: clear stack, then leave null + //TODO: clear stack, then leave null? return; }