/*
* ===============================================================
- * KOZOS h8write
- * Version 0.1.0
+ * KOZOS H8/3069F Flash Writer.
* ===============================================================
- * Copyright (c) 2010-2011 Shinichiro Nakamura
+ * Copyright (c) 2010-2012 Shinichiro Nakamura
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
const unsigned char *buf,
const int siz)
{
+ unsigned int lastaddr = addr + siz;
for (int i = 0; i < siz; i++) {
memory_image[addr + i] = buf[i];
}
- if (memory_lastaddr < addr) {
- memory_lastaddr = addr;
+ if (memory_lastaddr < lastaddr) {
+ memory_lastaddr = lastaddr;
}
}