mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 02:15:43 -04:00
fix isgraph() prob
This commit is contained in:
parent
c5f0f39804
commit
dc2653365a
@ -22,7 +22,7 @@
|
|||||||
#include <notify.h>
|
#include <notify.h>
|
||||||
|
|
||||||
// for sprintf().
|
// for sprintf().
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
TypeHandle Datagram::_type_handle;
|
TypeHandle Datagram::_type_handle;
|
||||||
|
|
||||||
@ -73,7 +73,8 @@ dump_hex(ostream &out) const {
|
|||||||
}
|
}
|
||||||
out << " ";
|
out << " ";
|
||||||
for (p = line; p < line + 16 && p < num_bytes; p++) {
|
for (p = line; p < line + 16 && p < num_bytes; p++) {
|
||||||
if (isgraph(message[p]) || message[p] == ' ') {
|
// must cast to (unsigned char) to avoid conversion to large negative integers outside of 0xFF range
|
||||||
|
if (isgraph((unsigned char)message[p]) || message[p] == ' ') {
|
||||||
out << (char)message[p];
|
out << (char)message[p];
|
||||||
} else {
|
} else {
|
||||||
out << ".";
|
out << ".";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user