Skip to content

Commit 6de9d7a

Browse files
Follow-up to const clean-up (#7180)
1 parent 8f5ffa8 commit 6de9d7a

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/fread.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ static inline bool end_of_field(const char *ch)
293293
// default, and therefore characters in the range 0x80-0xFF are negative.
294294
// We use eol() because that looks at eol_one_r inside it w.r.t. \r
295295
// \0 (maybe more than one) before eof are part of field and do not end it; eol() returns false for \0 but the ch==eof will return true for the \0 at eof.
296-
return *ch == sep || (*ch <= 13 && (ch == eof || eol(&ch)));
296+
return *ch == sep || ((uint8_t)*ch <= 13 && (ch == eof || eol(&ch)));
297297
}
298298

299299
static inline const char *end_NA_string(const char *start)

src/freadR.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -457,8 +457,8 @@ size_t allocateDT(int8_t *typeArg, int8_t *sizeArg, int ncolArg, int ndrop, size
457457
if (colClassesAs) setAttrib(DT, sym_colClassesAs, colClassesAs);
458458
} else {
459459
int nprotect = 0;
460-
SEXP tt = PROTECT(allocVector(STRSXP, ncol - ndrop));
461-
setAttrib(DT, R_NamesSymbol, tt); nprotect++;
460+
SEXP tt = PROTECT(allocVector(STRSXP, ncol - ndrop)); nprotect++;
461+
setAttrib(DT, R_NamesSymbol, tt);
462462

463463
SEXP ss;
464464
if (colClassesAs) {

0 commit comments

Comments
 (0)