[libmicrohttpd] Run-Time Check Failure(Static Link in Debug)

2023-09-11 Thread luozhaotian
When test https://www.gnu.org/software/libmicrohttpd/tutorial.html chapter 5 Supporting basic authentication(libmicrohttpd-0.9.77/doc/examples/basicauthentication.cpp), i encounter this error: Run-Time Check Failure #1 - A cast to a smaller data type has caused a loss of data. If this was inte

Re: [libmicrohttpd] Run-Time Check Failure(Static Link in Debug)

2023-09-13 Thread luozhaotian
Visual Studio show this Debug Error: 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