diff options
author | jluehrs2 <jluehrs2@uiuc.edu> | 2008-03-17 23:58:36 -0500 |
---|---|---|
committer | jluehrs2 <jluehrs2@uiuc.edu> | 2008-03-17 23:58:36 -0500 |
commit | 89a05b6b885e4137f3d77dd006a31df81182587c (patch) | |
tree | 4f335515c629aa2dc297b67ca3b6073088a64abc /src/strings.c | |
parent | 44a801ac9d018484e1092106dbcd76bea2ead3b5 (diff) | |
download | luancurses-89a05b6b885e4137f3d77dd006a31df81182587c.tar.gz luancurses-89a05b6b885e4137f3d77dd006a31df81182587c.zip |
add error checking for character modes
Diffstat (limited to 'src/strings.c')
-rw-r--r-- | src/strings.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/strings.c b/src/strings.c index 0eca298..1a211a2 100644 --- a/src/strings.c +++ b/src/strings.c @@ -142,11 +142,7 @@ int get_color_enum(const char* str) int get_mode_enum(const char* str) { - int ret; - - ret = str2enum(modes, lengthof(modes), str); - - return ret == -1 ? A_NORMAL : ret; + return str2enum(modes, lengthof(modes), str); } int get_key_enum(const char* str) |