Commit a9953097 authored by Bruce Momjian's avatar Bruce Momjian

Clean up printability test in dbase code.

parent 22b305ad
...@@ -334,7 +334,7 @@ dbf_get_record(dbhead * dbh, field * fields, u_long rec) ...@@ -334,7 +334,7 @@ dbf_get_record(dbhead * dbh, field * fields, u_long rec)
{ {
end = &dbffield[fields[t].db_flen - 1]; end = &dbffield[fields[t].db_flen - 1];
i = fields[t].db_flen; i = fields[t].db_flen;
while ((i > 0) && ((*end < 0x21) || (*end > 0x7E))) while (i > 0 && !isprint(*end))
{ {
end--; end--;
i--; i--;
...@@ -346,7 +346,7 @@ dbf_get_record(dbhead * dbh, field * fields, u_long rec) ...@@ -346,7 +346,7 @@ dbf_get_record(dbhead * dbh, field * fields, u_long rec)
{ {
end = dbffield; end = dbffield;
i = fields[t].db_flen; i = fields[t].db_flen;
while ((i > 0) && ((*end < 0x21) || (*end > 0x7E))) while (i > 0 && !isprint(*end))
{ {
end++; end++;
i--; i--;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment