X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=cde%2Fprograms%2Fdtpad%2FfileIo.c;h=bf1450aa81393656213a7fc7b886c2e33637fe1b;hb=f0a6172d3fa3cf2c1b370e85fa135dbdfa0c7a56;hp=cd5db3309637b6bef694bd9ab83afdda593a340d;hpb=c884521619ded86baea5e0a74c8d0d2234c232fe;p=oweals%2Fcde.git diff --git a/cde/programs/dtpad/fileIo.c b/cde/programs/dtpad/fileIo.c index cd5db330..bf1450aa 100644 --- a/cde/programs/dtpad/fileIo.c +++ b/cde/programs/dtpad/fileIo.c @@ -16,7 +16,7 @@ * details. * * You should have received a copy of the GNU Lesser General Public - * License along with these librararies and programs; if not, write + * License along with these libraries and programs; if not, write * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth * Floor, Boston, MA 02110-1301 USA */ @@ -314,7 +314,7 @@ AddPound( strcat(returnBuf, "#"); } else { sprintf(returnBuf, "#%s", tempBuf); - if(returnBuf[strlen(returnBuf) - 1] != (char)'#') + if(strlen(returnBuf) && returnBuf[strlen(returnBuf) - 1] != (char)'#') strcat(returnBuf, "#"); } } else {