Skip to content

Commit

Permalink
Fix NULL test in _testinternalcapi (GH-92861)
Browse files Browse the repository at this point in the history
  • Loading branch information
sweeneyde authored May 17, 2022
1 parent bd30461 commit 702e0da
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Modules/_testinternalcapi.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 702e0da

Please sign in to comment.