Updated license date, tweaked an error message

This commit is contained in:
2025-01-14 13:23:23 +11:00
parent 513d8f130c
commit 730353342d
4 changed files with 4 additions and 3 deletions

View File

@@ -17,3 +17,4 @@ TOY_API void Toy_resetPrintCallback(void);
TOY_API void Toy_resetErrorCallback(void);
TOY_API void Toy_resetAssertFailureCallback(void);
//TODO: rename print.h to debug?

View File

@@ -153,7 +153,7 @@ void Toy_assignScope(Toy_Scope* scope, Toy_String* key, Toy_Value value) {
//constness check
if (Toy_getNameStringVarConstant( TOY_VALUE_AS_STRING(entryPtr->key) )) {
char buffer[key->info.length + 256];
sprintf(buffer, "Can't assign to const %s", key->name.data);
sprintf(buffer, "Can't reassign to constant variable %s", key->name.data);
Toy_error(buffer);
return;
}