From bc643bbe2e2c1afbed18ce2bcf4aed138fece412 Mon Sep 17 00:00:00 2001 From: Peter Zhu Date: Fri, 7 Jan 2022 15:11:25 -0500 Subject: [PATCH] Use unsigned short for length of embedded strings --- include/ruby/internal/core/rstring.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/ruby/internal/core/rstring.h b/include/ruby/internal/core/rstring.h index a682dbe22f..4a8aa3f7d3 100644 --- a/include/ruby/internal/core/rstring.h +++ b/include/ruby/internal/core/rstring.h @@ -280,7 +280,7 @@ struct RString { /** Embedded contents. */ struct { #if USE_RVARGC - short len; + unsigned short len; /* This is a length 1 array because: * 1. GCC has a bug that does not optimize C flexible array members * (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=102452)