Commit bcd2c549 authored by Chris's avatar Chris
Browse files

replaced == string comparison with strcasecmp()

parent 769cc40c
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -2,6 +2,7 @@
#include "dicelogic.h"
#include "menu.h"
#include "utils.h"
#include "string.h"

// yaht.c
// Copyright (c) 2025
@@ -14,7 +15,7 @@ int main(void) {
	game_context ctx;
	// initialize random device for game state
	ctx.random_device_fd = get_urandom();
	int next_roll[NUM_DICE];
	unsigned int next_roll[NUM_DICE];

	// set terminal to raw mode so we have more control over single keypress user inputs
	set_raw_terminal_configuration();
@@ -31,7 +32,7 @@ int main(void) {

	const char *selected_action = menu_prompt(items, num_menu_items);

	if (selected_action == "demo") {
	if (strcasecmp(selected_action, "demo") == 0) {
		do_demo_dice_rolls(&ctx, next_roll);
	}