3
0
mirror of https://github.com/cytodev/LightDMMock.git synced 2024-11-28 17:09:47 +01:00

Should fix the off by one.

This commit is contained in:
CytoDev 2016-07-13 00:09:51 +02:00
parent 7c9da485f7
commit 580563abe3

View File

@ -404,8 +404,8 @@ window.deprecationNotifier = function(type, deprecated, alternative) {
* @throws {IncompatibleArgumentTypesException} * @throws {IncompatibleArgumentTypesException}
*/ */
window.checkArguments = function(args, length, types) { window.checkArguments = function(args, length, types) {
if(args.length -1 !== length) if(args.length !== length)
throw new IncompatibleArgumentCountException(length, args.length -1); throw new IncompatibleArgumentCountException(length, args.length);
for(var i = 1; i <= types.length; i++) { for(var i = 1; i <= types.length; i++) {
if(typeof args[i] !== types[i-1]) if(typeof args[i] !== types[i-1])