Use g_snprintf()

svn path=/trunk/; revision=31507
This commit is contained in:
Anders Broman 2010-01-12 20:08:30 +00:00
parent d5c96e34e7
commit 1f6a39eae9
1 changed files with 2 additions and 2 deletions

View File

@ -2203,9 +2203,9 @@ static void dissect_ulsch_or_dlsch(tvbuff_t *tvb, packet_info *pinfo, proto_tree
/* Show bytes too. There must be a nicer way of doing this! */
pdu_data = tvb_get_ptr(tvb, offset, pdu_lengths[n]);
for (i=0; i < data_length; i++) {
snprintf(buff+(i*2), 3, "%02x", pdu_data[i]);
g_snprintf(buff+(i*2), 3, "%02x", pdu_data[i]);
if (i >= 30) {
snprintf(buff+(i*2), 4, "...");
g_snprintf(buff+(i*2), 4, "...");
break;
}
}