diff --git a/src/machine.cpp b/src/machine.cpp index dce3bfe185..84a34caf67 100644 --- a/src/machine.cpp +++ b/src/machine.cpp @@ -3010,7 +3010,7 @@ Machine::Machine(System* system, Heap* heap, Finder* bootFinder, const char* bootstrapProperty = findProperty(this, BOOTSTRAP_PROPERTY); const char* bootstrapPropertyDup = bootstrapProperty ? strdup(bootstrapProperty) : 0; - const char* bootstrapPropertyEnd = bootstrapProperty + (bootstrapProperty ? strlen(bootstrapProperty) : 0); + const char* bootstrapPropertyEnd = bootstrapPropertyDup + (bootstrapPropertyDup ? strlen(bootstrapPropertyDup) : 0); char* codeLibraryName = (char*)bootstrapPropertyDup; char* codeLibraryNameEnd = 0; if (codeLibraryName && (codeLibraryNameEnd = strchr(codeLibraryName, system->pathSeparator())))