From: viktor DOT lundstrom AT mailbox DOT swipnet DOT se (Viktor Lundstrom) Newsgroups: comp.os.msdos.djgpp Subject: strange error Date: Fri, 10 Apr 1998 21:24:20 GMT Organization: A customer of Tele2 Lines: 22 Message-ID: <352e8c65.2654329@nntpserver.swip.net> NNTP-Posting-Host: nn1.swip.net Mime-Version: 1.0 Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 8bit Cache-Post-Path: nn1!s-13642 AT dialup207-3-52 DOT swipnet DOT se To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk I receive a General Protection Fault when calling sprintf() - but only if I have run another function before. Hereīs the code : void abc(int nr) { char tstr[50]; ... some strcpy/strcatīs sprintf(tstr, "%d", nr); <- General Protection Fault } The error only occurs if I have run another function before (a sort of menu-system... it uses some inline asm functions (but these functions are used elsewhere throughout the game)). I assume that the error lies in that I clobber some register or something somewhere before... Is there anything special I should think about when doing inline asm? (for example, is it possible to declare any clobbered segment-registers?)