-
Notifications
You must be signed in to change notification settings - Fork 342
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #768 from cazfi/srvup
- Loading branch information
Showing
6 changed files
with
124 additions
and
119 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
From 638959581b0967db72823d936720c1b48a15149e Mon Sep 17 00:00:00 2001 | ||
From: Marko Lindqvist <[email protected]> | ||
Date: Wed, 18 Oct 2023 08:25:13 +0300 | ||
Subject: [PATCH 29/29] Fix dbv_copy() | ||
|
||
It was overwriting the pointer, not pointed memory. | ||
|
||
See osdn #48869 | ||
|
||
Signed-off-by: Marko Lindqvist <[email protected]> | ||
--- | ||
utility/bitvector.c | 2 +- | ||
1 file changed, 1 insertion(+), 1 deletion(-) | ||
|
||
diff --git a/utility/bitvector.c b/utility/bitvector.c | ||
index 17a65411e6..d0895d5499 100644 | ||
--- a/utility/bitvector.c | ||
+++ b/utility/bitvector.c | ||
@@ -225,7 +225,7 @@ void dbv_copy(struct dbv *dest, const struct dbv *src) | ||
dbv_resize(dest, src->bits); | ||
} | ||
|
||
- memcpy(&dest->vec, src->vec, _BV_BYTES(src->bits)); | ||
+ memcpy(dest->vec, src->vec, _BV_BYTES(src->bits)); | ||
} | ||
|
||
/***********************************************************************//** | ||
-- | ||
2.42.0 | ||
|
35 changes: 35 additions & 0 deletions
35
freeciv/patches/backports/0031-city_from_wonder-Fix-illegal-array-subscript-warning.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
From 0caae00b77c7b02882521e2a1253c68413ee57f5 Mon Sep 17 00:00:00 2001 | ||
From: Marko Lindqvist <[email protected]> | ||
Date: Sun, 15 Oct 2023 21:54:24 +0300 | ||
Subject: [PATCH 31/32] city_from_wonder(): Fix illegal array subscript warning | ||
|
||
See osdn #48849 | ||
|
||
Signed-off-by: Marko Lindqvist <[email protected]> | ||
--- | ||
common/improvement.c | 9 ++++++++- | ||
1 file changed, 8 insertions(+), 1 deletion(-) | ||
|
||
diff --git a/common/improvement.c b/common/improvement.c | ||
index a8e04e4ff5..39eda11b8e 100644 | ||
--- a/common/improvement.c | ||
+++ b/common/improvement.c | ||
@@ -890,7 +890,14 @@ bool wonder_is_built(const struct player *pplayer, | ||
struct city *city_from_wonder(const struct player *pplayer, | ||
const struct impr_type *pimprove) | ||
{ | ||
- int city_id = pplayer->wonders[improvement_index(pimprove)]; | ||
+ int idx = improvement_index(pimprove); | ||
+ int city_id; | ||
+ | ||
+ if (idx < 0) { | ||
+ return NULL; | ||
+ } | ||
+ | ||
+ city_id = pplayer->wonders[idx]; | ||
|
||
fc_assert_ret_val(NULL != pplayer, NULL); | ||
fc_assert_ret_val(is_wonder(pimprove), NULL); | ||
-- | ||
2.42.0 | ||
|
46 changes: 46 additions & 0 deletions
46
freeciv/patches/backports/0032-mapimg_help-Fix-format-overflow-warning.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
From 6635a583cdffcc810d51462f75cd752e6ad81c20 Mon Sep 17 00:00:00 2001 | ||
From: Marko Lindqvist <[email protected]> | ||
Date: Sun, 15 Oct 2023 22:02:59 +0300 | ||
Subject: [PATCH 32/32] mapimg_help(): Fix format-overflow warning | ||
|
||
See osdn #48850 | ||
|
||
Signed-off-by: Marko Lindqvist <[email protected]> | ||
--- | ||
common/mapimg.c | 10 +++++++--- | ||
1 file changed, 7 insertions(+), 3 deletions(-) | ||
|
||
diff --git a/common/mapimg.c b/common/mapimg.c | ||
index 13670f7af2..661b5e1311 100644 | ||
--- a/common/mapimg.c | ||
+++ b/common/mapimg.c | ||
@@ -620,6 +620,7 @@ char *mapimg_help(const char *cmdname) | ||
tool = imagetool_next(tool)) { | ||
enum imageformat format; | ||
const struct toolkit *toolkit = img_toolkit_get(tool); | ||
+ const char *separator = ""; | ||
|
||
if (!toolkit) { | ||
continue; | ||
@@ -627,12 +628,15 @@ char *mapimg_help(const char *cmdname) | ||
|
||
astr_add(&str_format, " - '%s': ", imagetool_name(tool)); | ||
|
||
- const char *separator = ""; | ||
for (format = imageformat_begin(); format != imageformat_end(); | ||
format = imageformat_next(format)) { | ||
if (toolkit->formats & format) { | ||
- astr_add(&str_format, "%s'%s'", separator, imageformat_name(format)); | ||
- separator = ", "; | ||
+ const char *name = imageformat_name(format); | ||
+ | ||
+ if (name != NULL) { | ||
+ astr_add(&str_format, "%s'%s'", separator, name); | ||
+ separator = ", "; | ||
+ } | ||
} | ||
} | ||
|
||
-- | ||
2.42.0 | ||
|
114 changes: 0 additions & 114 deletions
114
freeciv/patches/backports/0042-Meson-Make-manual-generator-build-optional.patch
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters