Version 2.8d - 8th September 2019

Fix save-image
This commit is contained in:
David Johnson-Davies 2019-09-08 10:47:49 +01:00 committed by GitHub
parent dd27e3eba6
commit 3b6cb57897
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -1,5 +1,5 @@
/* uLisp ARM 2.8c - www.ulisp.com
David Johnson-Davies - www.technoblogy.com - 7th September 2019
/* uLisp ARM 2.8d - www.ulisp.com
David Johnson-Davies - www.technoblogy.com - 8th September 2019
Licensed under the MIT license: https://opensource.org/licenses/MIT
*/
@ -577,7 +577,7 @@ int saveimage (object *arg) {
int bytesneeded = imagesize*8 + SYMBOLTABLESIZE + 20;
if (bytesneeded > DATAFLASHSIZE) error(SAVEIMAGE, PSTR("image size too large"), number(imagesize));
unsigned long addr = 0;
FlashBeginWrite(ceil(bytesneeded/65536));
FlashBeginWrite((bytesneeded+65535)/65536);
FlashWriteInt(&addr, (uintptr_t)arg);
FlashWriteInt(&addr, imagesize);
FlashWriteInt(&addr, (uintptr_t)GlobalEnv);