1
Vote

Expression: vector iterator + offset out of range

description

Sorry, my English is poor.

File:
InputBuilder.cpp

Code:
CInputBuilder& CInputBuilder:: AddMouseButtonDown(MouseButton button)
    {
    INPUT buttonDown;
    buttonDown.type = INPUT_MOUSE;
    buttonDown.mi.dwFlags =  MouseButtonExtensions::ToMouseButtonDownFlag( button); 
    _inputList.insert( _inputList.end()+1, buttonDown);
    return *this;
    }
My code:
    CMouseSimulator sim;
    sim.RightButtonClick();
Error:
_inputList.insert( _inputList.end()+1, buttonDown);

Update:
_inputList.insert( _inputList.end(), buttonDown);

file attachments

comments

Xolen wrote Jul 3, 2014 at 8:42 AM

thanks for having remove a bug