Skip to content

Commit 82183fd

Browse files
committed
Release 3.0.1 to fix bug in position log loading. Closes #18.
1 parent 03a7b20 commit 82183fd

File tree

5 files changed

+26
-13
lines changed

5 files changed

+26
-13
lines changed

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ making a [financial contribution](https://github.com/sponsors/baron1405). Thank
4747

4848
## Changelog
4949

50+
### Changes 3.0 to 3.0.1
51+
52+
- Fix bug in position log loading
53+
5054
### Changes 2.0.1 to 3.0
5155

5256
- Supported on Windows 10 and above.

src/meazure/VersionNumbers.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
/// @brief This file defines the file and product version numbers. It is
2222
/// included by Meazure.rc2 and becomes part of the program resources.
2323

24-
#define FILE_VERSION 3,0,0,3
25-
#define PRODUCT_VERSION 3,0,0,3
26-
#define STR_FILE_VERSION "3, 0, 0, 3\0"
27-
#define STR_PRODUCT_VERSION "3, 0, 0, 3\0"
24+
#define FILE_VERSION 3,0,1,1
25+
#define PRODUCT_VERSION 3,0,1,1
26+
#define STR_FILE_VERSION "3, 0, 1, 1\0"
27+
#define STR_PRODUCT_VERSION "3, 0, 1, 1\0"

src/meazure/XMLParser.cpp

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,8 @@ CString MeaXMLParserHandler::GetFilePathname()
248248
//*************************************************************************
249249

250250

251-
LPCTSTR MeaXMLParser::m_homeURL = _T("https://www.cthing.com/");
251+
CString MeaXMLParser::m_homeURL1(_T("https://www.cthing.com/"));
252+
CString MeaXMLParser::m_homeURL2(_T("http://www.cthing.com/"));
252253

253254

254255
MeaXMLParser::MeaXMLParser(MeaXMLParserHandler *handler, bool buildDOM) :
@@ -427,12 +428,19 @@ int MeaXMLParser::ExternalEntityRefHandler(XML_Parser parser,
427428
MeaXMLParser *ps = reinterpret_cast<MeaXMLParser*>(parser);
428429
CString sysId(FromUTF8(systemId));
429430

430-
if (sysId.Find(MeaXMLParser::m_homeURL) == 0) {
431+
int homeURLPos = sysId.Find(MeaXMLParser::m_homeURL1);
432+
int homeURLLen = MeaXMLParser::m_homeURL1.GetLength();
433+
if (homeURLPos < 0) {
434+
homeURLPos = sysId.Find(MeaXMLParser::m_homeURL2);
435+
homeURLLen = MeaXMLParser::m_homeURL2.GetLength();
436+
}
437+
438+
if (homeURLPos == 0) {
431439
TCHAR pathname[_MAX_PATH], drive[_MAX_DRIVE], dir[_MAX_DIR];
432440
GetModuleFileName(NULL, pathname, _MAX_PATH);
433441
_tsplitpath_s(pathname, drive, _MAX_DRIVE, dir, _MAX_DIR, NULL, 0, NULL, 0);
434442

435-
sysId = CString(drive) + CString(dir) + sysId.Mid(static_cast<int>(_tcslen(MeaXMLParser::m_homeURL)));
443+
sysId = CString(drive) + CString(dir) + sysId.Mid(homeURLLen);
436444
sysId.Replace(_T('/'), _T('\\'));
437445

438446
ps->m_pathnameStack->push(sysId);

src/meazure/XMLParser.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -542,19 +542,20 @@ class MeaXMLParser: public ev::IValidationHandler
542542
const XML_Char *dflt,
543543
int isrequired);
544544

545-
/// Called when an XML parsing error occurrs. Queries
545+
/// Called when an XML parsing error occurs. Queries
546546
/// the parser to determine the error and displays a dialog
547547
/// with a description of the problem.
548548
///
549549
void HandleParserError();
550550

551-
/// Called when an XML validation error occurrs.
551+
/// Called when an XML validation error occurs.
552552
///
553553
/// @param error [in] Describes the validation error.
554554
///
555555
virtual void HandleValidationError(const ev::ValidationError& error);
556556

557-
static LPCTSTR m_homeURL; ///< URL for cthing.com
557+
static CString m_homeURL1; ///< URL for cthing.com
558+
static CString m_homeURL2; ///< URL for cthing.com
558559

559560
XML_Parser m_parser; ///< The expat XML parser.
560561
bool m_isSubParser; ///< Indicates whether this is an external entity sub-parser.

support/installer/Meazure.iss

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55
[Setup]
66
AppId=Meazure
77
AppName=Meazure
8-
AppVerName=Meazure 3.0
9-
AppVersion=3.0
8+
AppVerName=Meazure 3.0.1
9+
AppVersion=3.0.1
1010
AppMutex=MeazureInstallerMutex
1111
OutputDir=..\..\dist
12-
OutputBaseFilename=meazr30x64
12+
OutputBaseFilename=meazr301x64
1313
AppPublisher=C Thing Software
1414
AppPublisherURL=https://www.cthing.com
1515
AppSupportURL=https://www.cthing.com

0 commit comments

Comments
 (0)