[#12663] Fix processor text/graphics buffer holding old content on restart
自动翻译暂时不可用
本帖暂时展示 GitHub 原始内容。
When restarting the processor by updating the code or using the Restart button on the Logic screen, the text and graphics buffers are not cleared and may be included in the first printflush/drawflush instructions on the next run. This PR clears both buffers when LExecutor loads new code.
To replicate the bug, use a microprocessor with a message and place the following code into it:
print "ok"
printflush message1
print "Not "
stopWhen run for the first time, the program will send ok to the message block. When restarted using the Restart button, Not ok will be displayed instead, Not coming from the execution before the restart. After the fix, this no longer happens.
This is a problem with programs that print some status information at the start and then don't update it, forcing these programs to run printflush null/drawflush null at startup. (I personally think this is worth fixing in V8, but it is true the problem has been there for a loooong time.)
If your pull request is not translation or serverlist-related, read the list of requirements below and check each box:
I have read the contribution guidelines.
I have ensured that my code compiles, if applicable.
I have ensured that any new features in this PR function correctly in-game, if applicable.
由 MDT GitHub 同步机器人自动同步。