[wiki] [sites] fixed 100% BROKEN CODE || jon

From: <git_AT_suckless.org>
Date: Mon, 13 Jul 2020 10:09:04 +0200

commit 06838e29d367046b9304b392d58ff7075d51c1e1
Author: jon <jonrevold_AT_gmail.com>
Date: Mon Jul 13 09:52:19 2020 +0200

    fixed 100% BROKEN CODE

diff --git a/dwm.suckless.org/patches/autostart/dwm-autostart-20200610-cb3f58a.diff b/dwm.suckless.org/patches/autostart/dwm-autostart-20200610-cb3f58a.diff
index 5245ace2..7e174247 100644
--- a/dwm.suckless.org/patches/autostart/dwm-autostart-20200610-cb3f58a.diff
+++ b/dwm.suckless.org/patches/autostart/dwm-autostart-20200610-cb3f58a.diff
_AT_@ -82,7 +82,7 @@ index 4465af1..2156b49 100644
  static char stext[256];
  static int screen;
  static int sw, sh; /* X display screen geometry width, height */
-_AT_@ -1380,6 +1386,81 @@ run(void)
+_AT_@ -1380,6 +1386,83 @@ run(void)
                          handler[ev.type](&ev); /* call handler */
  }
  
_AT_@ -127,10 +127,12 @@ index 4465af1..2156b49 100644
 + /* the XDG conformant path does not exist or is no directory
 + * so we try ~/.dwm instead
 + */
-+ if (realloc(pathpfx, strlen(home) + strlen(dwmdir) + 3) == NULL) {
++ char *pathpfx_new = realloc(pathpfx, strlen(home) + strlen(dwmdir) + 3);
++ if(pathpfx_new == NULL) {
 + free(pathpfx);
 + return;
 + }
++ pathpfx = pathpfx_new;
 +
 + if (sprintf(pathpfx, "%s/.%s", home, dwmdir) <= 0) {
 + free(pathpfx);
Received on Mon Jul 13 2020 - 10:09:04 CEST

This archive was generated by hypermail 2.3.0 : Mon Jul 13 2020 - 10:12:50 CEST