On 14-03-04 11:37, Gustavo Sverzut Barbieri wrote:
> > _handle_esc_csi(Termpty *ty, const Eina_Unicode *c, Eina_Unicode *ce)
> > {
> > Eina_Unicode *cc;
> > - int arg, i;
> > + int arg, i, j;
> > Eina_Unicode buf[4096], *b;
> > + char *pos;
> ...
> > + pos = (char *)buf;
> ...
> > + pos += sprintf(pos, "\033[35m%08x\033[0m", c[j]);
> > + else
> > + pos += sprintf(pos, "%c", c[j]);
>
> you just created a monster using those cast. Okay, buf is 4096 and you
> check boundaries using that exact number, but god why abuse this?
>
> I'd say replace this with eina_strbuf as it will simplify and avoid
> hacks at the expense of malloc(), but since this is error handling it
> shouldn't be a big deal of performance.You're right. I should clean it up. -- Boris Faure Pointer Arithmetician
signature.asc
Description: Digital signature
------------------------------------------------------------------------------ Subversion Kills Productivity. Get off Subversion & Make the Move to Perforce. With Perforce, you get hassle-free workflows. Merge that actually works. Faster operations. Version large binaries. Built-in WAN optimization and the freedom to use Git, Perforce or both. Make the move to Perforce. http://pubads.g.doubleclick.net/gampad/clk?id=122218951&iu=/4140/ostg.clktrk
_______________________________________________ enlightenment-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
