]> git.sur5r.net Git - cc65/blobdiff - libsrc/common/vsprintf.s
Fixed a typo
[cc65] / libsrc / common / vsprintf.s
index b0376f4ae2cc4ad2430840207843475b5d766f18..2e2752b433a1f782472bc861dd5493a32ff36d73 100644 (file)
@@ -1,11 +1,11 @@
-;                                                      
+;
 ; int vsprintf (char* Buf, const char* Format, va_list ap);
 ;
 ; Ullrich von Bassewitz, 1.12.2000
 ;
 
        .export         _vsprintf
-       .import         pushax, popax, push1
+       .import         pushax, popax
        .import         _memcpy, __printf
        .importzp       sp, ptr1
 
@@ -33,7 +33,7 @@ outdesc:                      ; Static outdesc structure
 ; static void out (struct outdesc* d, const char* buf, unsigned count)
 ; /* Routine used for writing */
 ; {
-;     /* String - be shure to check the size */
+;     /* String - be sure to check the size */
 ;     while (count-- && d->ccount < d->uns) {
 ;        ((char*) d->ptr) [d->ccount] = *buf;
 ;        ++buf;
@@ -152,14 +152,10 @@ _vsprintf:
        tya
        sta     (ptr1),y
 
-; Return the number of bytes written. The carry is clear here because of the
-; last addition which will never overflow for sane code.
+; Return the number of bytes written.
 
-       lda     outdesc         ; ccount
-       ldx     outdesc+1
-       adc     #1              ; Account for terminator
-       bcc     @L9
-       inx
-@L9:   rts
+        lda     outdesc         ; ccount
+        ldx     outdesc+1
+       rts