Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion src/engine/engine_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,11 @@ void mj_saveModel(const mjModel* m, const char* filename, void* buffer, int buff
}

if (fp) {
fclose(fp);
int write_error = ferror(fp);
int close_error = fclose(fp);
if (write_error || close_error) {
mju_warning("Error saving model to '%s': file may be incomplete or corrupt", filename);
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/ui/ui_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1894,7 +1894,7 @@ static void shortcuthelp(mjrRect r, int modifier, int shortcut,
}

// combine
strcat(text, key);
strncat(text, key, sizeof(text) - strlen(text) - 1);

// make rectangle for shortcut
int g_textver = SCL(ui->spacing.textver, con);
Expand Down