mirror of
https://review.haiku-os.org/haiku
synced 2025-01-18 12:38:51 +01:00
rc: fix app_version handling during decompile
The length of the BeOS resource is twice as long because it contains additional system info. For resources compiled with the Haiku version of rc we can compare the length with a single sizeof(version_info) Change-Id: Ia0c243434a5dd5792d0b97e7baecdfaf6b4027be Reviewed-on: https://review.haiku-os.org/c/haiku/+/8827 Haiku-Format: Haiku-format Bot <no-reply+haikuformatbot@haiku-os.org> Reviewed-by: waddlesplash <waddlesplash@gmail.com> Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
This commit is contained in:
parent
08028803b1
commit
8738012f43
@ -900,7 +900,10 @@ write_data(int32 id, const char *name, type_code type,
|
||||
break;
|
||||
|
||||
case 'APPV':
|
||||
if (!strcmp(name, "BEOS:APP_VERSION") && length == sizeof(version_info) * 2) {
|
||||
if (!strcmp(name, "BEOS:APP_VERSION")
|
||||
&& (length == sizeof(version_info)
|
||||
// length can be twice the size for the old BeOS resource
|
||||
|| length == sizeof(version_info) * 2)) {
|
||||
write_app_version(data, length);
|
||||
return;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user