You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/games-arcade/xjump/files/xjump-2.7.5-c99.patch

17 lines
454 B

Polymorphism, C way
--- a/record.c 2024-04-04 11:22:00.801603415 +0000
+++ b/record.c 2024-04-04 11:26:16.515731335 +0000
@@ -198,8 +198,11 @@
/* ソート比較関数 */
-static int sort_cmp( record_t *r1, record_t *r2 )
+static int sort_cmp(const void *v1, const void *v2 )
{
+ const record_t *r1 = (const record_t *) v1;
+ const record_t *r2 = (const record_t *) v2;
+
if( r1->score > r2->score )
return -1;
else if( r1->score < r2->score )