From 09b70330d6e2bef14d97a7d38c09588f56383c3a Mon Sep 17 00:00:00 2001 From: James Snyder Date: Mon, 1 Aug 2011 20:31:30 -0500 Subject: [PATCH] fix case where intervals that are too long don't get reported --- src/modules/tmr.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/modules/tmr.c b/src/modules/tmr.c index df89dedb..1827a40b 100644 --- a/src/modules/tmr.c +++ b/src/modules/tmr.c @@ -133,8 +133,10 @@ static int tmr_set_match_int( lua_State *L ) res = platform_timer_set_match_int( id, ( u32 )luaL_checknumber( L, 2 ), ( int )luaL_checkinteger( L, 3 ) ); if( res == PLATFORM_TIMER_INT_TOO_SHORT ) return luaL_error( L, "timer interval too small" ); + else if( res == PLATFORM_TIMER_INT_TOO_LONG ) + return luaL_error( L, "timer interval too long" ); else if( res == PLATFORM_TIMER_INT_INVALID_ID ) - return luaL_error( L, "mach interrupt cannot be set on this timer" ); + return luaL_error( L, "match interrupt cannot be set on this timer" ); return 0; } #endif // #ifdef BUILD_LUA_INT_HANDLERS