🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.nn
1 messages
1 total messages Started by Jonathan Laventhol Sun, 15 Nov 1992 17:07
Bugfix: Core dump from menu
#3382
Author: Jonathan Laventhol
Date: Sun, 15 Nov 1992 17:07
35 lines
1515 bytes
Hello -- Here's a bug fix to a small problem in NN version 6.4
Cheers,
J.

-----------------------------------------------------------
Jonathan Laventhol, Systems Administrator, <jcl@deshaw.com>
D.E. Shaw & Co., 120 West 45th Street, New York, NY 10036.
-----------------------------------------------------------

PROGRAM:
	NN Version 6.4

DESCRIPTION:
	In the reading menu, choosing the first non-existent
	article dumps core (segmentation fault).

DIAGNOSIS:
	Simple fencepost problem.

FIX:
	Function get_k_cmd_1, file menu.c, line 728.  Comparison of
	0-origin article_id (derived from keypress) and
	1-origin menu_articles (number of articles).
	Change from
		article_id > menu_articles
	to
		article_id >= menu_articles

DIFF:
728c728
< 	if (article_id < 0 || article_id > menu_articles) {
---
> 	if (article_id < 0 || article_id >= menu_articles) {

(end)
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads