Skip to content

Commit

Permalink
examples/ezusb: Fix error checking regression in recent commit
Browse files Browse the repository at this point in the history
Commit 00454ab accidently botched error checking when replacing
rewind() with fseek().

Thanks to GitHub user "anotheruserofgithub" for noticing.

Closes libusb#1539
  • Loading branch information
seanm authored and tormodvolden committed Jul 29, 2024
1 parent 4528752 commit 30ec25f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion examples/ezusb.c
Original file line number Diff line number Diff line change
Expand Up @@ -816,7 +816,7 @@ int ezusb_load_ram(libusb_device_handle *device, const char *path, int fx_type,

/* at least write the interrupt vectors (at 0x0000) for reset! */
status = fseek(image, 0L, SEEK_SET);
if (ret < 0) {
if (status < 0) {
logerror("unable to rewind file %s\n", path);
ret = status;
goto exit;
Expand Down
2 changes: 1 addition & 1 deletion libusb/version_nano.h
Original file line number Diff line number Diff line change
@@ -1 +1 @@
#define LIBUSB_NANO 11932
#define LIBUSB_NANO 11933

0 comments on commit 30ec25f

Please sign in to comment.