~ruther/CTU-FEE-B0B35APO-Semestral-project

35f41bfa771d354e59f237a26925ec56b5fd903c — František Boháček 3 years ago 4c2fc8e
fix: saving exec options
1 files changed, 2 insertions(+), 2 deletions(-)

M file-browser/src/options.c
M file-browser/src/options.c => file-browser/src/options.c +2 -2
@@ 83,13 83,13 @@ file_operation_error_t exec_options_loader_load(exec_options_loader_t *loader,
}

file_operation_error_t exec_options_save(exec_options_t *options, char *filename) {
  uint32_t length = sizeof(exec_options_t);
  uint32_t length = sizeof(load_exec_options_t);
  for (int i = 0; i < options->options_count; i++) {
    exec_option_t option = options->options[i];
    option.mime_length = strlen(option.mime);
    option.program_length = strlen(option.program);
    option.length = (option.mime_length + option.program_length) * sizeof(char) +
                sizeof(exec_option_t) + 2;
                sizeof(load_exec_option_t) + 2;
    length += option.length;

    options->options[i] = option;

Do not follow this link