diff --git a/src/basic/basic_commands/cmd_let.s b/src/basic/basic_commands/cmd_let.s index 580b4221..bfd8822b 100644 --- a/src/basic/basic_commands/cmd_let.s +++ b/src/basic/basic_commands/cmd_let.s @@ -273,8 +273,16 @@ cmd_let_assign_string_not_text_area: // XXX - // No special case optimization is possible - alocate new memory area + // No special case optimization is possible + // Free the memory belonging to the old string + // XXX + // jsr varstr_free_DSCPNT_set + + + // And allocate memory for the new string + + lda __FAC1+0 ldy #$00 #if CONFIG_MEMORY_MODEL_60K @@ -288,9 +296,6 @@ cmd_let_assign_string_not_text_area: #endif - lda __FAC1+0 - sta (VARPNT), y - jsr varstr_alloc // Copy the string @@ -344,8 +349,4 @@ cmd_let_assign_string_not_text_area: #endif - // Free the memory of the old string - - // XXX - rts