Skip to content

Commit 07a37e9

Browse files
committed
Use strlen in empty string check, fix test comment
1 parent 93fa8e0 commit 07a37e9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src_c/imageext.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ imageext_load_animation(PyObject *self, PyObject *arg, PyObject *kwargs)
226226
}
227227

228228
if (name) { /* override extension with namehint if given */
229-
type = (name[0] != '\0') ? iext_find_extension(name) : NULL;
229+
type = (strlen(name) != 0) ? iext_find_extension(name) : NULL;
230230
}
231231
else { /* Otherwise type should be whatever ext is, even if ext is NULL */
232232
type = ext;

test/image_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1362,7 +1362,7 @@ def test_load_sized_svg_erroring(self):
13621362

13631363
@unittest.skipIf(
13641364
pygame.image.get_sdl_image_version() < (2, 6, 0),
1365-
"load_sized_svg requires SDL_image 2.6.0+",
1365+
"load_animation requires SDL_image 2.6.0+",
13661366
)
13671367
def test_load_animation(self):
13681368
# test loading from a file

0 commit comments

Comments
 (0)