Skip to content
Commit 618dfd65 authored by Marcel Raad's avatar Marcel Raad Committed by Daniel Stenberg
Browse files

inet_pton.c: Fix MSVC run-time check failure

Visual Studio complains with a message box:

"Run-Time Check Failure #1 - A cast to a smaller data type has caused a
loss of data.  If this was intentional, you should mask the source of
the cast with the appropriate bitmask.

For example:
char c = (i & 0xFF);

Changing the code in this way will not affect the quality of the
resulting optimized code."

This is because only 'val' is cast to unsigned char, so the "& 0xff" has
no effect.

Closes #387
parent 1f1f131e
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment