Adjust to ObjFW changes
FossilOrigin-Name: 020bc36b4af8074862e2362743fa479d4741bb8b077f7687fdd8bd00e1d56ef4
This commit is contained in:
parent
06a5fb81fa
commit
8359bd75ef
1 changed files with 7 additions and 1 deletions
|
@ -122,7 +122,13 @@ showHelp(OFStream *output, bool verbose)
|
||||||
bool invalid = false;
|
bool invalid = false;
|
||||||
|
|
||||||
@try {
|
@try {
|
||||||
generator.length = (size_t)lengthString.decimalValue;
|
unsigned long long length =
|
||||||
|
lengthString.unsignedLongLongValue;
|
||||||
|
|
||||||
|
if (length > SIZE_MAX)
|
||||||
|
@throw [OFOutOfRangeException exception];
|
||||||
|
|
||||||
|
generator.length = (size_t)length;
|
||||||
} @catch (OFInvalidFormatException *e) {
|
} @catch (OFInvalidFormatException *e) {
|
||||||
invalid = true;
|
invalid = true;
|
||||||
} @catch (OFOutOfRangeException *e) {
|
} @catch (OFOutOfRangeException *e) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue