mirror of
https://github.com/theoludwig/programming-challenges.git
synced 2025-05-18 12:02:53 +02:00
fix(solutions): memory issues thanks to -fsanitize=address flag with gcc
This commit is contained in:
@ -9,8 +9,8 @@
|
||||
|
||||
int main() {
|
||||
char* string = input();
|
||||
string = string_to_upper(string);
|
||||
string = string_replace(string, ' ', '\0');
|
||||
string_to_uppercase(string);
|
||||
string_remove_character(string, ' ');
|
||||
bool is_palindrome = string_is_palindrome(string);
|
||||
free(string);
|
||||
printf("%s\n", is_palindrome ? "true" : "false");
|
||||
|
Reference in New Issue
Block a user