aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkdx <kikoodx@paranoici.org>2023-01-13 16:55:27 +0100
committerkdx <kikoodx@paranoici.org>2023-01-13 16:55:27 +0100
commit997d18c51025bfdd1de43cc219ccd875ece6a0d2 (patch)
tree8b4118c4b347dfac0967d3ad78cfd7b296049650
parente75c741edbbc0d34002508178c3d7d9358a21eec (diff)
downloadtwtxtc-997d18c51025bfdd1de43cc219ccd875ece6a0d2.tar.gz
fix for loop & invert twt display order
-rw-r--r--twtxt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/twtxt.c b/twtxt.c
index fd15e87..b7f05d8 100644
--- a/twtxt.c
+++ b/twtxt.c
@@ -335,7 +335,7 @@ int main(int argc, char *argv[]) {
int i = 0; /* loop variable */
int j = 0; /* limiter to maxVal */
- for (i = iAllTweets; i >= 0, j <= maxVal; --i, ++j) {
+ for (i = 0; i < iAllTweets && j <= maxVal; i++, j++) {
/* Print the newest tweets (user<spacing>tweet). */
if (strlen(ptr[i].username) > iLongestNickname) {
/* Faulty line. */