Skip to content

Commit

Permalink
Fixed wrong parameter index for channel
Browse files Browse the repository at this point in the history
  • Loading branch information
marius-meissner committed Dec 30, 2017
1 parent 1cef156 commit ede7b10
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/SpiRegularInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ void SpiRegularInterface::__construct(Php::Parameters &params)
{
if (!constructBaseParameters(params[1], params[2])) {return;};

int _channel = params[1];
int _channel = params[0];
if (_channel < 0) {BerrySpiExceptions::InvalidArgumentException("No negative values allowed for <channel> parameter"); return;}
channel = _channel;
}
Expand Down

0 comments on commit ede7b10

Please sign in to comment.