diff options
| author | Aargh Rai <aargh.rai+git@gmail.com> | 2026-07-18 14:02:18 +0530 |
|---|---|---|
| committer | Aargh Rai <aargh.rai+git@gmail.com> | 2026-07-18 14:04:14 +0530 |
| commit | 9395e857db95481f6e2494d3a841632be0ff97c8 (patch) | |
| tree | dfaa6ab66ea5dd083c060a5dba0cf41ed9cb754c /src/uci | |
| parent | c34b4c1b036058b2906556850cc4ded6ececcf89 (diff) | |
fixed moved gen & adding messages on asserts
Diffstat (limited to 'src/uci')
| -rw-r--r-- | src/uci/response.c | 2 | ||||
| -rw-r--r-- | src/uci/state.c | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/uci/response.c b/src/uci/response.c index da46cb7..ff89f8d 100644 --- a/src/uci/response.c +++ b/src/uci/response.c @@ -78,7 +78,7 @@ void handle_idle(uci_state_t *state, uci_cmd_t cmd) { return; } state->position = fen.position; - } else { assert(0); } + } else { assert(0 && "Invalid argument for position command"); } if (cmd.args_count >= k) return; assert(strcmp(uci_cmd_get_arg(cmd, k++), "moves") == 0); diff --git a/src/uci/state.c b/src/uci/state.c index ac043ed..012d951 100644 --- a/src/uci/state.c +++ b/src/uci/state.c @@ -104,7 +104,7 @@ void print_setting(option_setting_t setting) { printf("string default %s\n", setting.data.string_default); } else if (OPTION_BUTTON == setting.type) { printf("button\n"); - } else { assert(0); } + } else { assert(0 && "Failed to print the options"); } } void uci_state_init(uci_state_t *state) { @@ -207,7 +207,7 @@ void apply_option(uci_state_t *state, char *name, char *buffer) { memcpy(setting.value.string->data, buffer, setting.value.string->length); } else if (OPTION_BUTTON == setting.type) { *setting.value.button = true; - } else { assert(0); } + } else { assert(0 && "Failed to apply the option"); } memcpy(state->option_settings + i, &setting, sizeof(setting)); return; |
