Remove trailing "." from OID strings.
The previous change removed code that did that. Change-Id: If297018f5902af7a2d9cacb0cc9a5f1ffe1e1d00 Reviewed-on: https://code.wireshark.org/review/16834 Reviewed-by: Guy Harris <guy@alum.mit.edu>
This commit is contained in:
parent
a98b55f4f8
commit
a52793aec1
|
@ -862,6 +862,7 @@ char* oid_subid2string(wmem_allocator_t *scope, guint32* subids, guint len) {
|
|||
char* rel_oid_subid2string(wmem_allocator_t *scope, guint32* subids, guint len, gboolean is_absolute) {
|
||||
|
||||
wmem_strbuf_t *oid_str;
|
||||
gsize oid_str_len;
|
||||
|
||||
if(!subids || len == 0)
|
||||
return wmem_strdup(scope, "*** Empty OID ***");
|
||||
|
@ -875,6 +876,10 @@ char* rel_oid_subid2string(wmem_allocator_t *scope, guint32* subids, guint len,
|
|||
wmem_strbuf_append_printf(oid_str, "%u.",*subids++);
|
||||
} while(--len);
|
||||
|
||||
/* Remove trailing "." (which is guaranteed to be there) */
|
||||
oid_str_len = wmem_strbuf_get_len(oid_str);
|
||||
wmem_strbuf_truncate(oid_str, oid_str_len - 1);
|
||||
|
||||
return wmem_strbuf_finalize(oid_str);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue