lanoxx / tilda

A Gtk based drop down terminal for Linux and Unix
GNU General Public License v2.0
1.28k stars 161 forks source link

src/tilda_terminal.c:677: possible bad if test ? #118

Closed dcb314 closed 9 years ago

dcb314 commented 9 years ago

[src/tilda_terminal.c:677]: (warning) Char literal compared with pointer 'word_chars'. Did you intend to dereference it?

Source code is

if (NULL == word_chars || '\0' == word_chars)
    word_chars = DEFAULT_WORD_CHARS;

Maybe

if (NULL == word_chars || '\0' == *word_chars)
    word_chars = DEFAULT_WORD_CHARS;

was intended.

lanoxx commented 9 years ago

Your analysis looks correct. I will fix this. Note that most of the code is very old and I have not touched every line of code yet. So suggestions and error reports are always welcome. Thank you.