Index: uspace/lib/cpp/include/internal/locale/num_get.hpp
===================================================================
--- uspace/lib/cpp/include/internal/locale/num_get.hpp	(revision e8c4c593555b7bbf278da2b0834907cb847a9ae7)
+++ uspace/lib/cpp/include/internal/locale/num_get.hpp	(revision d91b329a70257d6cc6e0faa0bd880bea3f0fa13a)
@@ -329,4 +329,5 @@
                 auto loc = base.getloc();
                 const auto& ct = use_facet<ctype<char_type>>(loc);
+                auto hex = ((base.flags() & ios_base::hex) != 0);
 
                 size_t i{};
@@ -337,5 +338,7 @@
                 {
                     auto c = *in;
-                    if (ct.is(ctype_base::digit, c))
+                    if (ct.is(ctype_base::digit, c) || (hex &&
+                       ((c >= ct.widen('A') && c <= ct.widen('F')) ||
+                        (c >= ct.widen('a') && c <= ct.widen('f')))))
                     {
                         ++in;
@@ -345,5 +348,5 @@
                         break;
                 }
-                base.buffer_[i] = '\0';
+                base.buffer_[i] = char_type{};
 
                 return i;
