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,9 @@ int main() {
|
||||
char* string = input();
|
||||
int shift;
|
||||
scanf("%d", &shift);
|
||||
string = string_caesar_cipher(string, shift);
|
||||
printf("%s\n", string);
|
||||
char* result = string_caesar_cipher(string, shift);
|
||||
printf("%s\n", result);
|
||||
free(string);
|
||||
free(result);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
Reference in New Issue
Block a user