Skip to content

Commit

Permalink
Release 3.0.1 to fix bug in position log loading. Closes #18.
Browse files Browse the repository at this point in the history
  • Loading branch information
baron1405 committed Apr 7, 2022
1 parent 03a7b20 commit 82183fd
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 13 deletions.
4 changes: 4 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ making a [financial contribution](https://github.com/sponsors/baron1405). Thank

## Changelog

### Changes 3.0 to 3.0.1

- Fix bug in position log loading

### Changes 2.0.1 to 3.0

- Supported on Windows 10 and above.
Expand Down
8 changes: 4 additions & 4 deletions src/meazure/VersionNumbers.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
/// @brief This file defines the file and product version numbers. It is
/// included by Meazure.rc2 and becomes part of the program resources.

#define FILE_VERSION 3,0,0,3
#define PRODUCT_VERSION 3,0,0,3
#define STR_FILE_VERSION "3, 0, 0, 3\0"
#define STR_PRODUCT_VERSION "3, 0, 0, 3\0"
#define FILE_VERSION 3,0,1,1
#define PRODUCT_VERSION 3,0,1,1
#define STR_FILE_VERSION "3, 0, 1, 1\0"
#define STR_PRODUCT_VERSION "3, 0, 1, 1\0"
14 changes: 11 additions & 3 deletions src/meazure/XMLParser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,8 @@ CString MeaXMLParserHandler::GetFilePathname()
//*************************************************************************


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


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

if (sysId.Find(MeaXMLParser::m_homeURL) == 0) {
int homeURLPos = sysId.Find(MeaXMLParser::m_homeURL1);
int homeURLLen = MeaXMLParser::m_homeURL1.GetLength();
if (homeURLPos < 0) {
homeURLPos = sysId.Find(MeaXMLParser::m_homeURL2);
homeURLLen = MeaXMLParser::m_homeURL2.GetLength();
}

if (homeURLPos == 0) {
TCHAR pathname[_MAX_PATH], drive[_MAX_DRIVE], dir[_MAX_DIR];
GetModuleFileName(NULL, pathname, _MAX_PATH);
_tsplitpath_s(pathname, drive, _MAX_DRIVE, dir, _MAX_DIR, NULL, 0, NULL, 0);

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

ps->m_pathnameStack->push(sysId);
Expand Down
7 changes: 4 additions & 3 deletions src/meazure/XMLParser.h
Original file line number Diff line number Diff line change
Expand Up @@ -542,19 +542,20 @@ class MeaXMLParser: public ev::IValidationHandler
const XML_Char *dflt,
int isrequired);

/// Called when an XML parsing error occurrs. Queries
/// Called when an XML parsing error occurs. Queries
/// the parser to determine the error and displays a dialog
/// with a description of the problem.
///
void HandleParserError();

/// Called when an XML validation error occurrs.
/// Called when an XML validation error occurs.
///
/// @param error [in] Describes the validation error.
///
virtual void HandleValidationError(const ev::ValidationError& error);

static LPCTSTR m_homeURL; ///< URL for cthing.com
static CString m_homeURL1; ///< URL for cthing.com
static CString m_homeURL2; ///< URL for cthing.com

XML_Parser m_parser; ///< The expat XML parser.
bool m_isSubParser; ///< Indicates whether this is an external entity sub-parser.
Expand Down
6 changes: 3 additions & 3 deletions support/installer/Meazure.iss
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
[Setup]
AppId=Meazure
AppName=Meazure
AppVerName=Meazure 3.0
AppVersion=3.0
AppVerName=Meazure 3.0.1
AppVersion=3.0.1
AppMutex=MeazureInstallerMutex
OutputDir=..\..\dist
OutputBaseFilename=meazr30x64
OutputBaseFilename=meazr301x64
AppPublisher=C Thing Software
AppPublisherURL=https://www.cthing.com
AppSupportURL=https://www.cthing.com
Expand Down

0 comments on commit 82183fd

Please sign in to comment.