git.asbjorn.biz
/
swftools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
made 'make install' install ruby module, too
[swftools.git]
/
lib
/
devices
/
rescale.c
diff --git
a/lib/devices/rescale.c
b/lib/devices/rescale.c
index
17750a3
..
350dfd2
100644
(file)
--- a/
lib/devices/rescale.c
+++ b/
lib/devices/rescale.c
@@
-54,7
+54,7
@@
static void dbg(char*format, ...)
int l;
va_list arglist;
va_start(arglist, format);
int l;
va_list arglist;
va_start(arglist, format);
- vsprintf(buf, format, arglist);
+ vsnprintf(buf, sizeof(buf)-1, format, arglist);
va_end(arglist);
l = strlen(buf);
while(l && buf[l-1]=='\n') {
va_end(arglist);
l = strlen(buf);
while(l && buf[l-1]=='\n') {
@@
-121,6
+121,12
@@
int rescale_setparameter(gfxdevice_t*dev, const char*key, const char*value)
if(!strcmp(key, "keepratio")) {
i->keepratio = atoi(value);
return 1;
if(!strcmp(key, "keepratio")) {
i->keepratio = atoi(value);
return 1;
+ } else if(!strcmp(key, "centerx")) {
+ i->centerx = atoi(value);
+ return 1;
+ } else if(!strcmp(key, "centery")) {
+ i->centery = atoi(value);
+ return 1;
} else {
if(i->out) {
return i->out->setparameter(i->out,key,value);
} else {
if(i->out) {
return i->out->setparameter(i->out,key,value);