val_to_str(int1,data,"%s"); when using this function it works fine but if int1 isn't found in the value_string structure then it crashes wireshark. The value_string structure looks like this: static const value_string data[] = { { 0x01, "Test1" }, { 0x03, "Test2" }, { 0, NULL } }; so if the value 0x02 was used then wireshark would crash. I thought it would return NULL if the value wasnt found. Is there any return value I can check to make sure its returning a valid string? asked 13 Feb '13, 14:19 StealthUE |
One Answer:
val_to_str will pass answered 13 Feb '13, 14:50 Gerald Combs ♦♦ |
thanks..."%d" worked