diff options
author | Benoit Germain <bnt.germain@gmail.com> | 2013-03-12 17:21:49 +0100 |
---|---|---|
committer | Benoit Germain <bnt.germain@gmail.com> | 2013-03-12 17:21:49 +0100 |
commit | 6261eab8d81a6901201cb711283da6281db193ec (patch) | |
tree | e491282dc237906a4f0eb890c4dfa506cbbde251 /src/lanes.c | |
parent | 367ef8140d560db270e5d8458eb986590f6f93ef (diff) | |
download | lanes-6261eab8d81a6901201cb711283da6281db193ec.tar.gz lanes-6261eab8d81a6901201cb711283da6281db193ec.tar.bz2 lanes-6261eab8d81a6901201cb711283da6281db193ec.zip |
Fixed a little APICHECK issue
Diffstat (limited to 'src/lanes.c')
-rw-r--r-- | src/lanes.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/lanes.c b/src/lanes.c index 7bd29ee..f792293 100644 --- a/src/lanes.c +++ b/src/lanes.c | |||
@@ -914,10 +914,11 @@ static void linda_id( lua_State*L, char const * const which) | |||
914 | struct s_Linda *s; | 914 | struct s_Linda *s; |
915 | size_t name_len = 0; | 915 | size_t name_len = 0; |
916 | char const* linda_name = NULL; | 916 | char const* linda_name = NULL; |
917 | int const top = lua_gettop( L); | ||
917 | 918 | ||
918 | if( lua_type( L, lua_gettop( L)) == LUA_TSTRING) | 919 | if( top > 0 && lua_type( L, top) == LUA_TSTRING) |
919 | { | 920 | { |
920 | linda_name = lua_tostring( L, lua_gettop( L)); | 921 | linda_name = lua_tostring( L, top); |
921 | name_len = strlen( linda_name); | 922 | name_len = strlen( linda_name); |
922 | } | 923 | } |
923 | 924 | ||