Skip to content

Commit 960ec12

Browse files
committed
COMMON: update changelog
1 parent ef39179 commit 960ec12

File tree

3 files changed

+19
-17
lines changed

3 files changed

+19
-17
lines changed

ChangeLog

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
2016-05-14 (0.12.6)
2+
Fix to prevent const overwriting another const
3+
Updated MID and REPLACE for performance
4+
POINT(0) and POINT(1) values now reset with each program run
5+
POINT(-x, -y) now provides access to the base screen image. For better
6+
performance use the IMAGE.SAVE sub command
7+
18
2016-05-07 (0.12.6)
29
Reverted LASTX/LASTY. Data was already accessible via POINT command
310
Reverted getPixel from SCREEN for performance. Can still access this by passed -ve x/y values

src/common/file.c

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -96,18 +96,13 @@ int dev_freefilehandle() {
9696
*/
9797
dev_file_t *dev_getfileptr(const int handle) {
9898
dev_file_t *result;
99-
if (!opt_file_permitted) {
100-
rt_raise(ERR_FILE_PERM);
99+
// BASIC handles start from 1
100+
int hnd = handle - 1;
101+
if (hnd < 0 || hnd >= OS_FILEHANDLES) {
102+
rt_raise(FSERR_HANDLE);
101103
result = NULL;
102104
} else {
103-
// BASIC handles start from 1
104-
int hnd = handle - 1;
105-
if (hnd < 0 || hnd >= OS_FILEHANDLES) {
106-
rt_raise(FSERR_HANDLE);
107-
result = NULL;
108-
} else {
109-
result = &file_table[hnd];
110-
}
105+
result = &file_table[hnd];
111106
}
112107
return result;
113108
}
@@ -162,11 +157,6 @@ int dev_fopen(int sb_handle, const char *name, int flags) {
162157
dev_file_t *f;
163158
int i;
164159

165-
if (!opt_file_permitted) {
166-
rt_raise(ERR_FILE_PERM);
167-
return 0;
168-
}
169-
170160
if ((f = dev_getfileptr(sb_handle)) == NULL) {
171161
return 0;
172162
}
@@ -238,6 +228,11 @@ int dev_fopen(int sb_handle, const char *name, int flags) {
238228
}
239229
} // device
240230

231+
if (!opt_file_permitted && f->type != ft_http_client) {
232+
rt_raise(ERR_FILE_PERM);
233+
return 0;
234+
}
235+
241236
//
242237
// open
243238
//

src/ui/textedit.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1044,7 +1044,7 @@ void TextEditInput::editTab() {
10441044
}
10451045

10461046
bool TextEditInput::endStatement(const char *buf) {
1047-
const struct Holder {
1047+
static const struct Holder {
10481048
const char *symbol;
10491049
int len;
10501050
} term[] = {
@@ -1059,7 +1059,7 @@ bool TextEditInput::endStatement(const char *buf) {
10591059
{"end", 3},
10601060
{"until ", 6}
10611061
};
1062-
const int len = sizeof(term) / sizeof(Holder);
1062+
static const int len = sizeof(term) / sizeof(Holder);
10631063
bool result = false;
10641064
for (int i = 0; i < len && !result; i++) {
10651065
if (strncasecmp(buf, term[i].symbol, term[i].len) == 0) {

0 commit comments

Comments
 (0)