Bartosz Kosiorek (@gang65) commented about dlls/msvcrt/tests/string.c:
ok(ret == EINVAL, "Expected _mbsupr_s to return EINVAL, got %d\n", ret); ok(errno == EINVAL, "Expected errno to be EINVAL, got %d\n", errno);
- // If string length is less than declared buffer length,
- memcpy(buffer, "ABCDEFGH", sizeof("ABCDEFGH"));
- errno = EBADF;
- ret = p_mbsupr_s(buffer, 2);
- ok(ret == EINVAL, "Expected p_mbsupr_s to return EINVAL, got %d\n", ret);
- ok(errno == EINVAL, "Expected errno to be EINVAL, got %d\n", errno);
The method should throw an EINVAL in case:
If numberOfElements is less than the length of the string, the functions also return EINVAL and set errno to EINVAL.
More information is available at: https://learn.microsoft.com/en-us/cpp/c-runtime-library/reference/strlwr-s-s...
In this change I would like to implement that behaviour.