Commit ce8b77c2 authored by Peter Pentchev's avatar Peter Pentchev

hex: only treat 32 - 126 as printable.

parent 656d8178
......@@ -4,6 +4,9 @@ Changelog for libdebug.
- fix a compiler warning about a printf format string in hex.c
- set the version number explicitly in src/Makefile instead of
extracting it from the library name
- hex: only treat character values between 32 and 126 as
printable, the rest is very much locale-dependent and
multibyte locales are much more common these days
0.4.4 2011/07/19
- fix a compiler warning about an unused variable in memory.c
......
/*
* Copyright (c) 2002-2004 Abraham vd Merwe <abz@blio.com>
* Copyright (c) 2016 Peter Pentchev <roam@ringlet.net>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
......@@ -37,10 +38,7 @@
static __inline__ int printable (int c)
{
return ((c >= 32 && c <= 126) ||
(c >= 174 && c <= 223) ||
(c >= 242 && c <= 243) ||
(c >= 252 && c <= 253));
return c >= 32 && c <= 126;
}
static void dump16 (char *buf,const uint8_t *s,uintptr_t offset,size_t len)
......
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