Skip to content

Commit 61fcc59

Browse files
committed
Fix string concat issue
1 parent c535914 commit 61fcc59

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

hd-tests.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ test__create_horizontal_line__is_console_width()
2222
/* Act */
2323
create_horizontal_line(line, csbi);
2424
length = strlen(line);
25+
printf("length: %u\n", length);
2526

2627
/* Assert */
2728
if (length != console_width) {

hd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ create_horizontal_line(char * result, CONSOLE_SCREEN_BUFFER_INFO csbi)
6565
//if (i == console_width / 2) {
6666
// strcat(string, "%c", );
6767
//} else {
68-
strncat(result, &horizontal_line_character, 2);
68+
strncat(result, &horizontal_line_character, 1);
6969
//}
7070
}
7171

0 commit comments

Comments
 (0)