# HG changeset patch # User Matt Johnston # Date 1094150171 0 # Node ID e0acad552a929da306eae8ba1385828fd4ef58fa # Parent 2010f4119c1a1529a818ca4c3461296a5ab0b49c Read the last line of a file without a finishing '\n' correctly diff -r 2010f4119c1a -r e0acad552a92 dbutil.c --- a/dbutil.c Thu Sep 02 15:24:17 2004 +0000 +++ b/dbutil.c Thu Sep 02 18:36:11 2004 +0000 @@ -506,18 +506,17 @@ out: - buf_setpos(line, 0); /* if we didn't read anything before EOF or error, exit */ if (c == EOF && line->pos == 0) { - TRACE(("leave getauthline: failure")); + TRACE(("leave buf_getline: failure")); return DROPBEAR_FAILURE; } else { - TRACE(("leave getauthline: success")); + TRACE(("leave buf_getline: success")); + buf_setpos(line, 0); return DROPBEAR_SUCCESS; } - TRACE(("leave buf_getline")); } #endif