Skip to content

Commit

Permalink
kloker: improve patch for dfhack-0.47.05-r1
Browse files Browse the repository at this point in the history
  • Loading branch information
McArcady authored and McArcady committed Apr 17, 2021
1 parent dd7fe9c commit c17be11
Showing 1 changed file with 22 additions and 5 deletions.
27 changes: 22 additions & 5 deletions patches/kloker/default/100-fix-for-dfhack-47-05.patch
Original file line number Diff line number Diff line change
@@ -1,15 +1,32 @@
--- a/plugins/kloker.cpp 2021-04-05 18:21:05.240235124 +0200
+++ b/plugins/kloker.cpp 2021-04-08 21:00:39.721671597 +0200
@@ -44,7 +44,8 @@
#include "df/nemesis_record.h"
--- a/plugins/kloker.cpp 2020-06-01 15:11:31.000000000 +0200
+++ b/plugins/kloker.cpp 2021-04-17 13:58:53.751350483 +0200
@@ -45,6 +45,7 @@
#include "df/historical_entity.h"
#include "df/historical_figure.h"
#include "df/historical_figure_info.h"
+#include "df/historical_figure_relationships.h"
#include "df/histfig_hf_link.h"
#include "df/histfig_hf_link_type.h"
#include "df/activity_event.h"
@@ -6155,7 +6155,7 @@
@@ -6103,7 +6104,7 @@

if (show_details != 0 && show_details < 4) {

- if (ds.size() > to_lim) {
+ if ((ds.size() > to_lim) && (to_lim >= 3)) {
ds.resize(to_lim - 3); ds += "...";
}
ds.resize(to_max);
@@ -6128,7 +6129,7 @@
if (rn + dn > to_lim) {
rg = " Rgds " + cur->regards;
rn = rg.size();
- if (rn + dn > to_lim) {
+ if ((rn + dn > to_lim) && (to_lim - rn >= 3)) {
ds.resize(to_lim - rn - 3);
ds += ".. ";
dn = ds.size();
@@ -6154,7 +6155,7 @@
rg += ",Gods " + cur->godline;
int rn = rg.size(), dn = ds.size();

Expand Down

0 comments on commit c17be11

Please sign in to comment.