mirror of
https://github.com/Zeal-Operating-System/ZealOS.git
synced 2024-12-25 23:10:32 +00:00
Merge pull request #146 from mknos/strscan_memcopy
StrScan(): Copy into new buffer with MemCopy() instead of loop
This commit is contained in:
commit
cd46dc4ab3
2 changed files with 5 additions and 5 deletions
|
@ -14,7 +14,7 @@ U8 *rev_bits_table; //Table with U8 bits reversed
|
||||||
CDate local_time_offset;
|
CDate local_time_offset;
|
||||||
F64 *pow10_I64,
|
F64 *pow10_I64,
|
||||||
sys_os_version = 2.03;
|
sys_os_version = 2.03;
|
||||||
U64 sys_os_version_sub = 116;
|
U64 sys_os_version_sub = 117;
|
||||||
U8 *sys_os_version_str;
|
U8 *sys_os_version_str;
|
||||||
U8 *sys_os_version_full;
|
U8 *sys_os_version_full;
|
||||||
U8 *sys_os_version_nice;
|
U8 *sys_os_version_nice;
|
||||||
|
|
|
@ -242,7 +242,7 @@ and take address.
|
||||||
*/
|
*/
|
||||||
U8 *buf, *ptr, **pptr;
|
U8 *buf, *ptr, **pptr;
|
||||||
Bool left_justify = FALSE;
|
Bool left_justify = FALSE;
|
||||||
I64 ch, cur_arg = 0, i, len, *i_ptr, dec_len;
|
I64 ch, cur_arg = 0, len, *i_ptr, dec_len;
|
||||||
F64 *d_ptr;
|
F64 *d_ptr;
|
||||||
|
|
||||||
if (!format)
|
if (!format)
|
||||||
|
@ -301,9 +301,9 @@ and take address.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
buf = MAlloc(len + 1);
|
buf = MAlloc(len + 1);
|
||||||
for (i = 0; i < len; i++)
|
MemCopy(buf, src, len);
|
||||||
buf[i] = *src++;
|
buf[len] = 0;
|
||||||
buf[i] = 0;
|
src += len;
|
||||||
switch (ch)
|
switch (ch)
|
||||||
{
|
{
|
||||||
case 's':
|
case 's':
|
||||||
|
|
Loading…
Reference in a new issue