diff options
author | reinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f> | 2006-09-13 05:33:39 +0000 |
---|---|---|
committer | reinelt <reinelt@3ae390bd-cb1e-0410-b409-cd5a39f66f1f> | 2006-09-13 05:33:39 +0000 |
commit | 663f8445f1120cbb21653da3956f0e35be881ebe (patch) | |
tree | 990ec97345b605e9b7fb50553680c6879beb41c8 /plugin_file.c | |
parent | 55c3aae4044ca2115ba12194faa4e834e7899909 (diff) | |
download | lcd4linux-663f8445f1120cbb21653da3956f0e35be881ebe.tar.gz |
[lcd4linux @ 2006-09-13 05:33:39 by reinelt]
plugin_file: return empty string if file cannot be read; widget_text: load property as 'string', not as variable (triggered an ugly bug with variable list reallocated)
git-svn-id: https://ssl.bulix.org/svn/lcd4linux/trunk@710 3ae390bd-cb1e-0410-b409-cd5a39f66f1f
Diffstat (limited to 'plugin_file.c')
-rw-r--r-- | plugin_file.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/plugin_file.c b/plugin_file.c index 368eec9..2fc9ea0 100644 --- a/plugin_file.c +++ b/plugin_file.c @@ -1,4 +1,4 @@ -/* $Id: plugin_file.c,v 1.2 2006/07/19 01:57:01 cmay Exp $ +/* $Id: plugin_file.c,v 1.3 2006/09/13 05:33:39 reinelt Exp $ * * plugin to perform simple file operations * @@ -23,6 +23,9 @@ * * * $Log: plugin_file.c,v $ + * Revision 1.3 2006/09/13 05:33:39 reinelt + * plugin_file: return empty string if file cannot be read; widget_text: load property as 'string', not as variable (triggered an ugly bug with variable list reallocated) + * * Revision 1.2 2006/07/19 01:57:01 cmay * fixed double read of last line in file * @@ -70,6 +73,7 @@ static void my_readline(RESULT * result, RESULT * arg1, RESULT * arg2) fp = fopen(R2S(arg1), "r"); if (!fp) { error("readline couldn't open file '%s'", R2S(arg1)); + value[0] = '\0'; } else { i = 0; while (!feof(fp) && i++ < reqline) { |