Skip to content

Commit

Permalink
Merge pull request #4575 from jg1uaa/master
Browse files Browse the repository at this point in the history
fix type of return value at bool MountFat()
  • Loading branch information
joncampbell123 authored Nov 2, 2023
2 parents 26ae817 + 48c13ac commit 6f2798e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/dos/dos_programs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5928,7 +5928,7 @@ class IMGMOUNT : public Program {
FILE* newDisk = fopen_lock(fname, ro ? "rb" : "rb+", ro);
if(!newDisk) {
if(!qmount) WriteOut("Unable to open '%s'\n", fname);
return NULL;
return false;
}
QCow2Image::QCow2Header qcow2_header = QCow2Image::read_header(newDisk);
// uint64_t sectors; /* unused */
Expand All @@ -5938,7 +5938,7 @@ class IMGMOUNT : public Program {
uint32_t cluster_size = 1u << qcow2_header.cluster_bits;
if((sizes[0] < 512) || ((cluster_size % sizes[0]) != 0)) {
WriteOut("Sector size must be larger than 512 bytes and evenly divide the image cluster size of %lu bytes.\n", cluster_size);
return 0;
return false;
}
// sectors = (uint64_t)qcow2_header.size / (uint64_t)sizes[0]; /* unused */
imagesize = (uint32_t)(qcow2_header.size / 1024L);
Expand Down

0 comments on commit 6f2798e

Please sign in to comment.