Skip to content

Commit

Permalink
add definition for "clearTimeout"
Browse files Browse the repository at this point in the history
(same as clearInterval)
fix comment and commit typo
  • Loading branch information
noah- committed Aug 22, 2018
1 parent 045c847 commit cf13f9e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
1 change: 0 additions & 1 deletion D2BS.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

#define XP_WIN

#define D2BS_VERSION "1.5.1869"
#define D2BS_VERSION "1.5.1870"

#include <windows.h>
Expand Down
2 changes: 1 addition & 1 deletion JSCore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ JSAPI_FUNC(my_clearInterval)
{
JS_SET_RVAL(cx, vp, JSVAL_NULL);
if (argc != 1 || !JSVAL_IS_NUMBER(JS_ARGV(cx, vp)[0]))
JS_ReportError(cx, "params prams passed to clearInterval");
JS_ReportError(cx, "invalid params passed to clearInterval");

ScriptEngine::RemoveDelayedEvent(JSVAL_TO_INT(JS_ARGV(cx, vp)[0]));
JS_free(cx, "setInterval");
Expand Down
3 changes: 2 additions & 1 deletion JSGlobalFuncs.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,9 @@ static JSFunctionSpec global_funcs[] = {
// utility functions that don't have anything to do with the game
JS_FN("print", my_print, 1, FUNCTION_FLAGS),
JS_FN("setTimeout", my_setTimeout, 0, FUNCTION_FLAGS),
JS_FN("clearTimeout", my_clearInterval, 1, FUNCTION_FLAGS),
JS_FN("setInterval", my_setInterval, 0, FUNCTION_FLAGS),
JS_FN("clearInterval", my_clearInterval, 1, FUNCTION_FLAGS),
JS_FN("clearInterval", my_clearInterval, 1, FUNCTION_FLAGS),
JS_FN("delay", my_delay, 1, FUNCTION_FLAGS),
JS_FN("load", my_load, 1, FUNCTION_FLAGS),
JS_FN("isIncluded", my_isIncluded, 1, FUNCTION_FLAGS),
Expand Down

0 comments on commit cf13f9e

Please sign in to comment.