Re: [hackers] [st] Fixing color and refactor xsetcolorname. || Christoph Lohmann

From: FRIGN <>
Date: Sun, 1 Jun 2014 17:49:45 +0200

On Sun, 01 Jun 2014 17:10:40 +0200 wrote:

> By the recommendation of FRIGN I refactored xsetcolorname to remove the
> unnecessary r, g, b variables when allocating a new color. Colors are
> now freed and set to the new color. A die() should not happen here. Oth‐
> erwise it is easy for applications to kill st. St should be resilent to
> malicious input.

Thanks for fixing that and spotting the memory leak. I'll take more
care next time handling this.

> Second this patch standardises the naming of »color«. There is no
> »colour« here. Maybe in some parts of the world.

It's nice to see the naming-convention has finally been realized. It
was a real mess to have both "color" and "colour" in the local scope
and this will make the code more readable :).

Next up: Font cache.



Received on Sun Jun 01 2014 - 17:49:45 CEST

This archive was generated by hypermail 2.3.0 : Sun Jun 01 2014 - 18:00:13 CEST