Skip to content

Commit cd5a357

Browse files
committed
Fix LNK2005 with Clang due to 'console_screen_t *'
1 parent f332dc0 commit cd5a357

File tree

3 files changed

+4
-2
lines changed

3 files changed

+4
-2
lines changed

concolors.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ void console_init(console_screen_t **ci)
2323
}
2424

2525
void console_set_colors(console_color_t fg, console_color_t bg) {
26-
if (bg == COLOR_NONE && fg == COLOR_NONE) {
26+
if (console == NULL || (bg == COLOR_NONE && fg == COLOR_NONE)) {
2727
return;
2828
}
2929

concolors.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ typedef enum _console_color {
3838
COLOR_BRIGHT_WHITE = 0xf
3939
} console_color_t;
4040

41-
console_screen_t *console;
41+
extern console_screen_t *console;
4242

4343
/**
4444
* @brief

main.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@ const FILETIME ft_preserved = {
7373
0xFFFFFFFF
7474
};
7575

76+
console_screen_t *console;
77+
7678
/*!
7779
* @brief
7880
* Prints program usage information.

0 commit comments

Comments
 (0)