X-Git-Url: http://git.asbjorn.biz/?p=swftools.git;a=blobdiff_plain;f=src%2Fswfcombine.c;h=f564793c123dc2d9d747177fc371d9f3f17adb6a;hp=8981b1d00659174a046911708bceec67bddeff6b;hb=f1439716b85c476a3357e3bfb0e4a2effdf3c27b;hpb=4287f8d6ea808c266d8575a354fc2f2b116fdf2c diff --git a/src/swfcombine.c b/src/swfcombine.c index 8981b1d..f564793 100644 --- a/src/swfcombine.c +++ b/src/swfcombine.c @@ -1045,16 +1045,19 @@ void combine(SWF*master, char*slave_name, SWF*slave, SWF*newswf) if(config.isframe) { - int tmp; - if(slavename && slavename[0]!='#' && (sscanf(slavename, "%d", &tmp) == - strlen(slavename))) { - /* if the name the slave should replace - consists only of digits and the -f - option is given, it probably is not - a frame name but a frame number. - */ - slaveid = tmp; - slavename = 0; + if(slavename && slavename[0]!='#') { + int tmp; + int len; + sscanf(slavename, "%d%n", &tmp, &len); + if(len == strlen(slavename)) { + /* if the name the slave should replace + consists only of digits and the -f + option is given, it probably is not + a frame name but a frame number. + */ + slaveid = tmp; + slavename = 0; + } } if(slaveid>=0) {