From 6f138d38eeff7491a483e4894e756439bb3a19ee Mon Sep 17 00:00:00 2001 From: sweeneyde Date: Mon, 16 May 2022 20:33:06 -0400 Subject: [PATCH] Fix NULL test in _testinternalcapi --- Modules/_testinternalcapi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Modules/_testinternalcapi.c b/Modules/_testinternalcapi.c index 914b20b36f146b..238de749fffc5d 100644 --- a/Modules/_testinternalcapi.c +++ b/Modules/_testinternalcapi.c @@ -307,7 +307,7 @@ check_edit_cost(const char *a, const char *b, Py_ssize_t expected) goto exit; } b_obj = PyUnicode_FromString(b); - if (a_obj == NULL) { + if (b_obj == NULL) { goto exit; } Py_ssize_t result = _Py_UTF8_Edit_Cost(a_obj, b_obj, -1);