1
1
Fork 0
mirror of https://github.com/pbatard/rufus.git synced 2024-08-14 23:57:05 +00:00

[parser] fix unwanted removal of lines that don't match a token

* In replace_in_token_data() when looking for lines starting with a specific
  token but finding lines containing a larger version of the token (e.g. looking
  for 'linux' but finding 'linux16') we would forget to output the non matching
  line as we rejected it.
* This produced issues such as the one described at:
  https://ubuntuforums.org/showthread.php?t=2465291&page=10&p=14052629#post14052629
* Fix this by ensuring that we always output the lines that we reject.
This commit is contained in:
Pete Batard 2021-09-20 16:11:47 +01:00
parent deee38d4e5
commit 2761c72187
No known key found for this signature in database
GPG key ID: 38E0CF5E69EDD671
3 changed files with 9 additions and 7 deletions

View file

@ -11,7 +11,7 @@
<Identity
Name="19453.net.Rufus"
Publisher="CN=7AC86D13-3E5A-491A-ADD5-80095C212740"
Version="3.16.1821.0" />
Version="3.16.1822.0" />
<Properties>
<DisplayName>Rufus</DisplayName>

View file

@ -1187,8 +1187,10 @@ char* replace_in_token_data(const char* filename, const char* token, const char*
// Skip whitespaces after token (while making sure there's at least one)
ns = wcsspn(&buf[i], wspace);
if (ns == 0)
if (ns == 0) {
fputws(buf, fd_out);
continue;
}
i += ns;
// p[x] = starting position of the fragment with the replaceable string

View file

@ -33,7 +33,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
IDD_DIALOG DIALOGEX 12, 12, 232, 326
STYLE DS_SETFONT | DS_MODALFRAME | DS_CENTER | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU
EXSTYLE WS_EX_ACCEPTFILES
CAPTION "Rufus 3.16.1821"
CAPTION "Rufus 3.16.1822"
FONT 9, "Segoe UI Symbol", 400, 0, 0x0
BEGIN
LTEXT "Drive Properties",IDS_DRIVE_PROPERTIES_TXT,8,6,53,12,NOT WS_GROUP
@ -395,8 +395,8 @@ END
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 3,16,1821,0
PRODUCTVERSION 3,16,1821,0
FILEVERSION 3,16,1822,0
PRODUCTVERSION 3,16,1822,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@ -414,13 +414,13 @@ BEGIN
VALUE "Comments", "https://rufus.ie"
VALUE "CompanyName", "Akeo Consulting"
VALUE "FileDescription", "Rufus"
VALUE "FileVersion", "3.16.1821"
VALUE "FileVersion", "3.16.1822"
VALUE "InternalName", "Rufus"
VALUE "LegalCopyright", "© 2011-2021 Pete Batard (GPL v3)"
VALUE "LegalTrademarks", "https://www.gnu.org/licenses/gpl-3.0.html"
VALUE "OriginalFilename", "rufus-3.16.exe"
VALUE "ProductName", "Rufus"
VALUE "ProductVersion", "3.16.1821"
VALUE "ProductVersion", "3.16.1822"
END
END
BLOCK "VarFileInfo"