NASM - The Netwide Assembler

NASM Forum => Using NASM => Topic started by: rob0323 on October 22, 2004, 06:57:55 AM

Title: scanf problem
Post by: rob0323 on October 22, 2004, 06:57:55 AM
Hello everyone.

I'm writing a asm program that calls scanf.  However, it is doesn't want to accept the 1st return and as a result automatically populates the second string field with the value before the 2nd return.  

ie.

enter name      // prompt
rob            <-- here's the 1st return
robAgain    <-- 2nd return

hi rob                // prints out my name
enter lastname  // prompt
smith
hello Mr. robAgain

I guess the buffer is not being flushed?

If someone knows what's going on and can point me in the right direction, I'd appreciate it.

Thanks for the time.
Title: Re: scanf problem
Post by: rob0323 on October 22, 2004, 04:07:31 PM
nevermind, I figured it out.  thanks anyway