Skip to content

Commit b3bcc4e

Browse files
committed
Update comparison
1 parent 3641398 commit b3bcc4e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

flang/runtime/environment.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,8 @@ void ExecutionEnvironment::Configure(int ac, const char *av[],
145145

146146
if (auto *x{std::getenv("CUDA_STACKLIMIT")}) {
147147
char *end;
148-
auto n{std::strtol(x, &end, 10)};
149-
if (n >= 0 && n < std::numeric_limits<int>::max() && *end == '\0') {
148+
auto n{std::strtoul(x, &end, 10)};
149+
if (n > 0 && n < std::numeric_limits<std::size_t>::max() && *end == '\0') {
150150
cudaStackLimit = n;
151151
} else {
152152
std::fprintf(stderr,

0 commit comments

Comments
 (0)