devrtc: fix mistake.

This commit is contained in:
cinap_lenrek 2022-07-21 00:44:34 +00:00
parent 4063334e6f
commit 3cc07dddfb
1 changed files with 1 additions and 1 deletions

View File

@ -177,7 +177,7 @@ rtcwrite(Chan* c, void* buf, long n, vlong off)
if(n >= sizeof(sbuf))
error(Ebadarg);
strncpy(sbuf, buf, n);
sbuf[n] = '\0'
sbuf[n] = '\0';
for(cp = sbuf; *cp != '\0'; cp++)
if(*cp >= '0' && *cp <= '9')
break;