Skip to content

Commit 236f3a7

Browse files
[mono] Fix incorrect version comparison in loader (#76698)
* Compare version components in the correct order in assembly_names_compare_versions * Fixes #76664 Co-authored-by: Ulrich Weigand <ulrich.weigand@de.ibm.com>
1 parent aafaffa commit 236f3a7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/mono/mono/metadata/assembly.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ mono_assembly_names_equal_flags (MonoAssemblyName *l, MonoAssemblyName *r, MonoA
268268
* if \p r is a lower version than \p l, or zero if \p l and \p r are equal
269269
* versions (comparing upto \p maxcomps components).
270270
*
271-
* Components are \c major, \c minor, \c revision, and \c build. \p maxcomps 1 means just compare
271+
* Components are \c major, \c minor, \c build, and \c revision. \p maxcomps 1 means just compare
272272
* majors. 2 means majors then minors. etc.
273273
*/
274274
static int
@@ -284,9 +284,9 @@ assembly_names_compare_versions (MonoAssemblyName *l, MonoAssemblyName *r, int m
284284
++i;
285285
CMP (minor);
286286
++i;
287-
CMP (revision);
288-
++i;
289287
CMP (build);
288+
++i;
289+
CMP (revision);
290290
#undef CMP
291291
return 0;
292292
}

0 commit comments

Comments
 (0)