From c1b853ca7c6bddaad4e77bd84f3845966b2adbda Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Wed, 22 May 2019 12:01:46 +0200 Subject: [PATCH] input/InputStream: define UNKNOWN_SIZE without undefined behavior --- src/input/InputStream.hxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/input/InputStream.hxx b/src/input/InputStream.hxx index c20abd706..3a2fc3ce7 100644 --- a/src/input/InputStream.hxx +++ b/src/input/InputStream.hxx @@ -76,7 +76,7 @@ protected: */ bool seekable = false; - static constexpr offset_type UNKNOWN_SIZE = -1; + static constexpr offset_type UNKNOWN_SIZE = ~offset_type(0); /** * the size of the resource, or #UNKNOWN_SIZE if unknown