Skip to content

Commit

Permalink
Fixed wrong value returned by ParameterPy::GetUnsigned
Browse files Browse the repository at this point in the history
  • Loading branch information
yorikvanhavre committed Jan 30, 2016
1 parent 15a4976 commit 2cb06c6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Base/ParameterPy.cpp
Expand Up @@ -276,8 +276,8 @@ Py::Object ParameterGrpPy::getUnsigned(const Py::Tuple& args)
if (!PyArg_ParseTuple(args.ptr(), "s|I", &pstr,&UInt))
throw Py::Exception();
#if PY_MAJOR_VERSION < 3
int cropped = _cParamGrp->GetUnsigned(pstr,UInt) & INT_MAX;
return Py::Int(cropped);
PyObject* val = Py_BuildValue("I",_cParamGrp->GetUnsigned(pstr,UInt));
return Py::Int(val);
#else
return Py::Long(_cParamGrp->GetUnsigned(pstr,UInt));
#endif
Expand Down

0 comments on commit 2cb06c6

Please sign in to comment.