mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 02:15:43 -04:00
flt: fix compile error on macOS 10.6 (which has no strnlen)
This commit is contained in:
parent
9ca0d089a6
commit
607af9ff49
@ -78,8 +78,8 @@ extract_record(FltRecordReader &reader) {
|
|||||||
bool FltBeadID::
|
bool FltBeadID::
|
||||||
extract_ancillary(FltRecordReader &reader) {
|
extract_ancillary(FltRecordReader &reader) {
|
||||||
if (reader.get_opcode() == FO_long_id) {
|
if (reader.get_opcode() == FO_long_id) {
|
||||||
vector_uchar s = reader.get_iterator().get_remaining_bytes();
|
DatagramIterator &di = reader.get_iterator();
|
||||||
_id.assign((const char *)s.data(), strnlen((const char *)s.data(), s.size()));
|
_id = di.get_fixed_string(di.get_remaining_size());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -621,8 +621,8 @@ extract_record(FltRecordReader &) {
|
|||||||
bool FltRecord::
|
bool FltRecord::
|
||||||
extract_ancillary(FltRecordReader &reader) {
|
extract_ancillary(FltRecordReader &reader) {
|
||||||
if (reader.get_opcode() == FO_comment) {
|
if (reader.get_opcode() == FO_comment) {
|
||||||
vector_uchar s = reader.get_iterator().get_remaining_bytes();
|
DatagramIterator &di = reader.get_iterator();
|
||||||
_comment.assign((const char *)s.data(), strnlen((const char *)s.data(), s.size()));
|
_comment = di.get_fixed_string(di.get_remaining_size());
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user