From 56e549640fe2297d100abd9a0c51ac61aace18e3 Mon Sep 17 00:00:00 2001 From: Michael Hansen Date: Mon, 12 Apr 2021 10:12:45 -0700 Subject: [PATCH] Fix format-truncation warning in bytecode.cpp --- bytecode.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bytecode.cpp b/bytecode.cpp index 13eec2b..ca4d9de 100644 --- a/bytecode.cpp +++ b/bytecode.cpp @@ -58,8 +58,8 @@ const char* Pyc::OpcodeName(int opcode) if (opcode < PYC_LAST_OPCODE) return opcode_names[opcode]; - static char badcode[10]; - snprintf(badcode, 10, "<%d>", opcode); + static char badcode[16]; + snprintf(badcode, sizeof(badcode), "<%d>", opcode); return badcode; };