[Bf-committers] cutedgeloop anomaly

joe joeedh at gmail.com
Tue Jul 28 19:23:50 CEST 2009


Ok I committed the patch.  Thanks!!

Joe

On Tue, Jul 28, 2009 at 11:04 AM, Fredrik Axelsson<fraxbe at gmail.com> wrote:
> Hello Everyone!
>
> Today I decided to make my first foray into the blender source to modify:
>
> void CutEdgeLoopSel(int numcuts) in editmesh_loop.c:218 ( blender-2.49a
> sources)
>
> I wanted to modify it to display the number of loop cuts in the window
> header
> before the cut was performed. To my surprise, I found that it is already
> supposed to do that. But it didn't, on my machine. Only "(S)mooth: on" or
> "(S)mooth off" showed up in the window header during the Loop Cut operation.
>
> from editmesh_loop.c:247 --
> =================
>            sprintf(msg,"Number of Cuts: %d",numcuts);
>            if(smooth){
>                sprintf(msg,"%s (S)mooth: on",msg);
>            } else {
>                sprintf(msg,"%s (S)mooth: off",msg);
>            }
> =================
>
> I then made a debug build to debug the function, but when I had recompiled
> blender with debug symbols on, the problem disappeared, the "Number of Cuts:
> %d" message appears in the window header.
>
> My platform is linux-2.6.30 (gentoo amd64, glibc-2.10.1), I have tried it
> with both gcc-4.3.3 and gcc-4.4.1. The binaries from both compilers behave
> exactly the same way.
>
> I attached a minimal patch, which replaces the last two sprintf calls with
> strcat calls instead. It seems to work as intended on my machine.
>
> I'm wondering if anyone else can confirm this issue, or if anyone knows why
> it behaves like this.
>
> Best regards,
>
> Fredrik
>
> _______________________________________________
> Bf-committers mailing list
> Bf-committers at blender.org
> http://lists.blender.org/mailman/listinfo/bf-committers
>
>


More information about the Bf-committers mailing list