-- Leo's gemini proxy
-- Connecting to git.thebackupbox.net:1965...
-- Connected
-- Sending request
-- Meta line: 20 text/gemini
repo: rxvt-unicode-sixel action: commit revision: path_from: revision_from: 820c71ce429adab101a4ea2c4260b9d36509fac0: path_to: revision_to:
commit 820c71ce429adab101a4ea2c4260b9d36509fac0 Author: Marc Lehmann <schmorp@schmorp.de> Date: Thu Jan 26 13:07:22 2012 +0000 *** empty log message *** diff --git a/src/rxvtfont.C b/src/rxvtfont.C
--- a/src/rxvtfont.C +++ b/src/rxvtfont.C @@ -1787,10 +1787,14 @@ found: if (!fmap[hi]) { - // C++ has no separate new and new [] - we need the "new" form, - // just like the syntax implies, but since pagemap is char[], - // C++ chooses the wrong new, so we need the cast and delete []. - fmap[hi] = (pagemap *)new pagemap; + // we use [1] here because C has no separate new and new [] forms, + // and pagemap is char[256], so new incorrectly assumes we want to + // allocate an array of chars instead of a single pagemap. + // we can either cast the resulting pointer to (pagemap *) or + // allocate an array of pagemaps, returning a pointer to the first member + // this is no extra overhead, as new even allocates an array for + // "new pagemap" + fmap[hi] = new pagemap[1]; memset (fmap[hi], 0xff, sizeof (pagemap)); }
-----END OF PAGE-----
-- Response ended
-- Page fetched on Sun Jun 2 12:06:25 2024