Skip to content

Commit 9ed22d9

Browse files
committed
Return the distance traversed
1 parent 4eadd0e commit 9ed22d9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

include/boost/int128/detail/mini_from_chars.hpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,9 @@ constexpr int from_chars_integer_impl(const char* first, const char* last, Integ
170170
}
171171
}
172172

173-
return 0;
173+
// This value will be negative to differentiate from errno values
174+
// since they are in the range of acceptable distances
175+
return static_cast<int>(first - next);
174176
}
175177
} // namespace impl
176178

0 commit comments

Comments
 (0)