about summary refs log tree commit diff
path: root/third_party/nix/src/libutil/serialise.hh
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/nix/src/libutil/serialise.hh')
-rw-r--r--third_party/nix/src/libutil/serialise.hh3
1 files changed, 2 insertions, 1 deletions
diff --git a/third_party/nix/src/libutil/serialise.hh b/third_party/nix/src/libutil/serialise.hh
index 04f672781015..bbfbe16a016c 100644
--- a/third_party/nix/src/libutil/serialise.hh
+++ b/third_party/nix/src/libutil/serialise.hh
@@ -248,9 +248,10 @@ T readNum(Source& source) {
       ((unsigned long long)buf[4] << 32) | ((unsigned long long)buf[5] << 40) |
       ((unsigned long long)buf[6] << 48) | ((unsigned long long)buf[7] << 56);
 
-  if (n > std::numeric_limits<T>::max())
+  if (n > std::numeric_limits<T>::max()) {
     throw SerialisationError("serialised integer %d is too large for type '%s'",
                              n, typeid(T).name());
+  }
 
   return (T)n;
 }