diff options
-rw-r--r-- | apps/plugins/lua/strftime.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/plugins/lua/strftime.c b/apps/plugins/lua/strftime.c index c6152bf492..cc110469bf 100644 --- a/apps/plugins/lua/strftime.c +++ b/apps/plugins/lua/strftime.c | |||
@@ -35,6 +35,9 @@ size_t strftime ( char* dst, size_t max, const char* format, const struct tm* t | |||
35 | const char* src; | 35 | const char* src; |
36 | unsigned long no; | 36 | unsigned long no; |
37 | char buf [5]; | 37 | char buf [5]; |
38 | #if CONFIG_RTC | ||
39 | char sbuf[101]; | ||
40 | #endif | ||
38 | 41 | ||
39 | if (!max) return 0; | 42 | if (!max) return 0; |
40 | for ( ; *format != '\0'; format++ ) { | 43 | for ( ; *format != '\0'; format++ ) { |
@@ -83,7 +86,6 @@ again: | |||
83 | case 's': { | 86 | case 's': { |
84 | #if CONFIG_RTC | 87 | #if CONFIG_RTC |
85 | time_t t = rb->mktime((struct tm*)tm); | 88 | time_t t = rb->mktime((struct tm*)tm); |
86 | char sbuf[101]; | ||
87 | char* c; | 89 | char* c; |
88 | sbuf[100]=0; | 90 | sbuf[100]=0; |
89 | for (c=sbuf+99; c>sbuf; --c) { | 91 | for (c=sbuf+99; c>sbuf; --c) { |