aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPavel Vymetálek <pavel@vym.cz>2021-01-20 13:31:57 +0100
committerPavel Vymetálek <pavel@vym.cz>2021-01-20 13:31:57 +0100
commit139969ef7b0ac660853899ac601bab330c111f71 (patch)
tree1288d9298f2ffbe00466c64f58d7ccdb59f202f1
parent8679629f8c9f6a45b3b44ca2f2f613232b7607dd (diff)
downloadsercp-pc-0.3.6.tar.gz
Fixed integer rounding - progress show 100% at the finishv0.3.6
-rw-r--r--sercp.c4
-rw-r--r--sercp.rc8
2 files changed, 6 insertions, 6 deletions
diff --git a/sercp.c b/sercp.c
index f19fea4..66baefb 100644
--- a/sercp.c
+++ b/sercp.c
@@ -68,7 +68,7 @@
#define FALSE 0
#define true 1
#define TRUE 1
-const char* _version = "v0.3.5";
+const char* _version = "v0.3.6";
// SERIAL
FILE *tapout_fd = NULL;
int is_outfile = 0;
@@ -293,7 +293,7 @@ void DoProgress(size_t pos, size_t max, unsigned char csum_ok) {
char progress_char;
p = pos;
m = max;
- percent = 100 / m * p;
+ percent = (100 / m * p) + 0.5;
ipercent = percent / 100 * imax;
if (is_binary) progress_char = '#';
else progress_char = '=';
diff --git a/sercp.rc b/sercp.rc
index 038e212..24679c0 100644
--- a/sercp.rc
+++ b/sercp.rc
@@ -1,8 +1,8 @@
// RC file, codepage utf-8 !!!!!
#include <windows.h> // include for version info constants
1 VERSIONINFO
-FILEVERSION 0,3,5,0
-PRODUCTVERSION 0,3,5,0
+FILEVERSION 0,3,6,0
+PRODUCTVERSION 0,3,6,0
FILETYPE VFT_APP
{
BLOCK "StringFileInfo"
@@ -10,14 +10,14 @@ FILETYPE VFT_APP
BLOCK "040904E4"
{
VALUE "CompanyName", "vym.cz"
- VALUE "FileVersion", "0.3.5"
+ VALUE "FileVersion", "0.3.6"
VALUE "FileDescription", "sercp - serial copy for ZX Spectrum"
VALUE "InternalName", "sercp"
VALUE "LegalCopyright", "GNU GPL v3 or above"
VALUE "LegalTrademarks", "Pavel Vymetálek"
VALUE "OriginalFilename", "sercp"
VALUE "ProductName", "sercp"
- VALUE "ProductVersion", "0.3.5"
+ VALUE "ProductVersion", "0.3.6"
VALUE "Build environment", "Linux: Mingw64, x86_64"
}
}