From c64c9caa7102fc864cdf121504f86572ce29f933 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Sat, 25 Apr 2015 11:54:49 -0700 Subject: 1200 --- cpp/termbox/output.inl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cpp/termbox/output.inl') diff --git a/cpp/termbox/output.inl b/cpp/termbox/output.inl index fd5d636f..7c66ce2d 100644 --- a/cpp/termbox/output.inl +++ b/cpp/termbox/output.inl @@ -163,7 +163,7 @@ static char *read_file(const char *file) { static char *terminfo_try_path(const char *path, const char *term) { char tmp[4096]; // snprintf guarantee for older compilers - assert(sizeof(tmp) > sizeof(path)+sizeof("/x/")+sizeof(term)+1; + assert(sizeof(tmp) > sizeof(path)+sizeof("/x/")+sizeof(term)+1); sprintf(tmp, "%s/%c/%s", path, term[0], term); char *data = read_file(tmp); if (data) { @@ -194,7 +194,7 @@ static char *load_terminfo(void) { if (home) { // snprintf guarantee for older compilers assert(sizeof(tmp) > sizeof(home)+sizeof("/.terminfo")+1); - strncpy(tmp, home, sizeof(home)); + strncpy(tmp, home, sizeof(tmp)); strcat(tmp, "/.terminfo"); char *data = terminfo_try_path(tmp, term); if (data) -- cgit 1.4.1-2-gfad0