From 7740c71ecedd90f9b465dc35994e64915dbda826 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Fri, 7 Oct 2022 10:10:01 +0200 Subject: a --- serialize/magnum-vector2i.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'serialize/magnum-vector2i.hpp') diff --git a/serialize/magnum-vector2i.hpp b/serialize/magnum-vector2i.hpp index eb445e21..c8c52e7e 100644 --- a/serialize/magnum-vector2i.hpp +++ b/serialize/magnum-vector2i.hpp @@ -27,12 +27,12 @@ struct adl_serializer> final { type x = 0, y = 0; int n = 0; int ret = std::sscanf(str.c_str(), format_string, &x, &y, &n); - if (ret != 2 || (std::size_t)n != str.size() || x != (type)x || y != (type)y) + if (ret != 2 || (std::size_t)n != str.size() || x != (t)x || y != (t)y) { std::string msg; msg.reserve(128); msg += "failed to parse string '"; msg += str; - msg += "' as Magnum::Vector2i"; + msg += "' as Magnum::Vector2"; throw std::invalid_argument(msg); } val = { (t)x, (t)y }; -- cgit v1.2.3