mirror of
https://github.com/holub/mame
synced 2025-07-01 00:09:18 +03:00
Hopefully fix build for everyone - someone please work out a way to make the bgfx examples build on platforms with/without the POSIX 2008 strnlen function (nw)
This commit is contained in:
parent
b2a66f5f5d
commit
189052cd58
5
3rdparty/bgfx/3rdparty/tinyexr/tinyexr.h
vendored
5
3rdparty/bgfx/3rdparty/tinyexr/tinyexr.h
vendored
@ -7076,8 +7076,7 @@ static const char *ReadString(std::string *s, const char *ptr) {
|
|||||||
static bool ReadAttribute(std::string *name, std::string *type,
|
static bool ReadAttribute(std::string *name, std::string *type,
|
||||||
std::vector<unsigned char> *data, size_t *marker_size,
|
std::vector<unsigned char> *data, size_t *marker_size,
|
||||||
const char *marker, size_t size) {
|
const char *marker, size_t size) {
|
||||||
using namespace bx;
|
size_t name_len = bx::strnlen(marker, size);
|
||||||
size_t name_len = strnlen(marker, size);
|
|
||||||
if (name_len == size) {
|
if (name_len == size) {
|
||||||
// String does not have a terminating character.
|
// String does not have a terminating character.
|
||||||
return false;
|
return false;
|
||||||
@ -7087,7 +7086,7 @@ static bool ReadAttribute(std::string *name, std::string *type,
|
|||||||
marker += name_len + 1;
|
marker += name_len + 1;
|
||||||
size -= name_len + 1;
|
size -= name_len + 1;
|
||||||
|
|
||||||
size_t type_len = strnlen(marker, size);
|
size_t type_len = bx::strnlen(marker, size);
|
||||||
if (type_len == size) {
|
if (type_len == size) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user