mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-20 22:30:30 +01:00
[apps/code] Status at the beginning of a script is one byte long
This saves space + avoids clashes with the NumWorks Workshop when exchanging scripts
This commit is contained in:
@@ -37,7 +37,7 @@ void EditorController::setScript(Script script, int scriptIndex) {
|
||||
* */
|
||||
|
||||
size_t newScriptSize = Ion::Storage::sharedStorage()->putAvailableSpaceAtEndOfRecord(m_script);
|
||||
m_editorView.setText(const_cast<char *>(m_script.content()), newScriptSize - Script::InformationSize());
|
||||
m_editorView.setText(const_cast<char *>(m_script.content()), newScriptSize - Script::StatusSize());
|
||||
}
|
||||
|
||||
void EditorController::willExitApp() {
|
||||
@@ -156,7 +156,7 @@ void EditorController::cleanStorageEmptySpace() {
|
||||
Ion::Storage::Record::Data scriptValue = m_script.value();
|
||||
Ion::Storage::sharedStorage()->getAvailableSpaceFromEndOfRecord(
|
||||
m_script,
|
||||
scriptValue.size - Script::InformationSize() - (strlen(m_script.content()) + 1)); // TODO optimize number of script fetches
|
||||
scriptValue.size - Script::StatusSize() - (strlen(m_script.content()) + 1)); // TODO optimize number of script fetches
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user