From 18c4baa9f3f22e1352defd6f3bd5edd56d62c970 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Wed, 16 Jun 2021 00:43:07 -0700 Subject: [PATCH] wslua_tvb: fix documentation for reported_length_remaining(). In the past, tvb_reported_length_remaining(), and thus Tvb:reported_length_remaining(), may have returned -1 if the offset was invalid. That's no longer the case; the former returns 0, and, as the latter just returns the former's return value, that's true of the latter as well. (cherry picked from commit 6c043d5c73e3bdbb84f988a82ebdfc18d77489b9) --- epan/wslua/wslua_tvb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/epan/wslua/wslua_tvb.c b/epan/wslua/wslua_tvb.c index 3e5c817ecb..6a17168308 100644 --- a/epan/wslua/wslua_tvb.c +++ b/epan/wslua/wslua_tvb.c @@ -157,7 +157,7 @@ WSLUA_METHOD Tvb_len(lua_State* L) { } WSLUA_METHOD Tvb_reported_length_remaining(lua_State* L) { - /* Obtain the reported (not captured) length of packet data to end of a <> or -1 if the + /* Obtain the reported (not captured) length of packet data to end of a <> or 0 if the offset is beyond the end of the <>. */ #define Tvb_reported_length_remaining_OFFSET 2 /* offset */ Tvb tvb = checkTvb(L,1);