diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c15164d9d..c53955988 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -151,7 +151,7 @@ jobs: run: | cd docs make html SPHINXOPTS=-W - python3 ./docs/verify-docstrings.py + python3 verify-docstrings.py linux: name: Linux needs: [commit-msg, clang-format] diff --git a/qrenderdoc/Code/Interface/PersistantConfig.h b/qrenderdoc/Code/Interface/PersistantConfig.h index d73791462..427fd33a5 100644 --- a/qrenderdoc/Code/Interface/PersistantConfig.h +++ b/qrenderdoc/Code/Interface/PersistantConfig.h @@ -356,7 +356,7 @@ DECLARE_REFLECTION_STRUCT(BugReport); "A :class:`ReplayOptions` containing the configured default replay options to use in most " \ "scenarios when no specific options are given.\n" \ "\n:" \ - "type: List[str]"); \ + "type: renderdoc.ReplayOptions"); \ CONFIG_SETTING(public, QVariant, ReplayOptions, DefaultReplayOptions) \ \ DOCUMENT( \ diff --git a/qrenderdoc/Code/pyrenderdoc/pyconversion.h b/qrenderdoc/Code/pyrenderdoc/pyconversion.h index 86da52269..7df4ac851 100644 --- a/qrenderdoc/Code/pyrenderdoc/pyconversion.h +++ b/qrenderdoc/Code/pyrenderdoc/pyconversion.h @@ -409,8 +409,25 @@ struct TypeConversion static PyObject *ConvertToPy(const rdcdatetime &in) { - return PyDateTime_FromDateAndTime(in.year, in.month, in.day, in.hour, in.minute, in.second, - in.microsecond); + rdcdatetime tmp = in; + +// bounds check +#define BOUND(prop, min, max) \ + if(tmp.prop < min) \ + tmp.prop = min; \ + if(tmp.prop > max) \ + tmp.prop = max; + + BOUND(year, 1, 9999); + BOUND(month, 1, 12); + BOUND(day, 1, 31); + BOUND(hour, 0, 23); + BOUND(minute, 0, 59); + BOUND(second, 0, 59); + BOUND(microsecond, 0, 999999); + + return PyDateTime_FromDateAndTime(tmp.year, tmp.month, tmp.day, tmp.hour, tmp.minute, + tmp.second, tmp.microsecond); } };