Fix remaining bugs with the CPC ROM version.
- Fix an extra const for the icons that shouldn't be there for the ROM
version. It is there in the loadable version of the DSC files to
workaround linker script limitations, but in the ROM it results in
trying to write to ROM when the icons are added to the desktop
- Fix a bug (broken code generation by the compiler?) that leads to
vertical lines in windows not stopping where they should and going all
the way down the screen (clipping was applied when it shouldn't,
leading to an overflow)
diff --git a/contiki-cpc/ctk/ctk-conio-service.c b/contiki-cpc/ctk/ctk-conio-service.c
index 08f52c1..c2ea4c0 100644
--- a/contiki-cpc/ctk/ctk-conio-service.c
+++ b/contiki-cpc/ctk/ctk-conio-service.c
@@ -448,13 +448,11 @@
}
}
- if(clipy2 < y1 + h) {
- if(y1 >= clipy2) {
- h = 0;
- } else {
- h = clipy2 - y1;
- }
- }
+ if(y1 >= clipy2) {
+ h = 0;
+ } else if(y1 + h > clipy2) {
+ h = clipy2 - y1;
+ }
cvlinexy(x, y1, h);
cvlinexy(x2, y1, h);