repo: rxvt-unicode-sixel action: commit revision: path_from: revision_from: 4545ce5fbe5111caa524a9c872a36ee75b62cb01: path_to: revision_to:
commit 4545ce5fbe5111caa524a9c872a36ee75b62cb01 Author: Emanuele GiaquintaDate: Wed Jun 27 20:26:15 2007 +0000 strndup is not portable. diff --git a/src/xpm.C b/src/xpm.C
--- a/src/xpm.C
+++ b/src/xpm.C
@@ -412,7 +412,10 @@ rxvt_term::set_bgPixmap (const char *file)
original_asim = get_asimage( asimman, file, 0xFFFFFFFF, 100 );
else
{
- f = strndup( file, f - file );
+ size_t len = f - file;
+ f = (char *)malloc (len + 1);
+ strncpy (f, file, len);
+ f[len] = '\0';
original_asim = get_asimage( asimman, f, 0xFFFFFFFF, 100 );
free( f );
}
-----END OF PAGE-----