Merge pull request #13472 from gemu2015/scripter_fix

fix compression error message
This commit is contained in:
Theo Arends 2021-10-26 08:49:03 +02:00 committed by GitHub
commit 6005fd48ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -5448,7 +5448,7 @@ void ScriptSaveSettings(void) {
//
uint32_t script_compress(char *dest, uint32_t size) {
//AddLog(LOG_LEVEL_INFO,PSTR("in string: %s len = %d"),glob_script_mem.script_ram,strlen(glob_script_mem.script_ram));
uint32_t len_compressed = SCRIPT_COMPRESS(glob_script_mem.script_ram, strlen(glob_script_mem.script_ram), dest, size);
int32_t len_compressed = SCRIPT_COMPRESS(glob_script_mem.script_ram, strlen(glob_script_mem.script_ram), dest, size);
if (len_compressed > 0) {
dest[len_compressed] = 0;
AddLog(LOG_LEVEL_INFO,PSTR("script compressed to %d bytes = %d %%"),len_compressed,len_compressed * 100 / strlen(glob_script_mem.script_ram));