mirror of
https://github.com/byteworksinc/ORCA-C.git
synced 2024-12-28 16:30:59 +00:00
Do not print "\000" at end of printf/scanf format strings.
This happened due to the change to include the null terminator in the internal representation of strings.
This commit is contained in:
parent
91d33b586d
commit
cb5db95476
12
Printf.pas
12
Printf.pas
@ -136,7 +136,7 @@ var
|
||||
WriteLine;
|
||||
if s <> nil then begin
|
||||
Write(' > "');
|
||||
for i := 1 to s^.length do begin
|
||||
for i := 1 to s^.length-1 do begin
|
||||
ch := s^.str[i];
|
||||
if ch in [' '..'~'] then begin
|
||||
if ch in ['"','\','?'] then
|
||||
@ -167,13 +167,13 @@ var
|
||||
Write(' ');
|
||||
if offset = 0 then
|
||||
if s <> nil then begin
|
||||
offset := s^.length;
|
||||
offset := s^.length-1;
|
||||
write(' ');
|
||||
end; {if}
|
||||
if offset > 0 then begin
|
||||
if s <> nil then begin
|
||||
if offset > s^.length then
|
||||
offset := s^.length;
|
||||
if s <> nil then begin
|
||||
if offset > 0 then begin
|
||||
if offset > s^.length-1 then
|
||||
offset := s^.length-1;
|
||||
for i := 1 to offset do begin
|
||||
ch := s^.str[i];
|
||||
if ch in [' '..'~'] then begin
|
||||
|
Loading…
Reference in New Issue
Block a user