projects
/
xscreensaver
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
http://packetstormsecurity.org/UNIX/admin/xscreensaver-3.34.tar.gz
[xscreensaver]
/
hacks
/
glx
/
starwars.c
diff --git
a/hacks/glx/starwars.c
b/hacks/glx/starwars.c
index cfb40f8c1e2262bf7844eb0fef14e80c04b67885..fb58e4c525d90596f820f2f7a285352bb3381fe7 100644
(file)
--- a/
hacks/glx/starwars.c
+++ b/
hacks/glx/starwars.c
@@
-357,12
+357,17
@@
get_more_lines (sws_configuration *sc)
return;
}
return;
}
- if (*s == '\n' || col > sc->columns)
+ if (*s == '\
r' || *s == '\
n' || col > sc->columns)
{
int L = s - sc->buf;
{
int L = s - sc->buf;
- if (*s == '\n')
- *s++ = 0;
+ if (*s == '\r' || *s == '\n')
+ {
+ if (*s == '\r' && s[1] == '\n') /* swallow CRLF too */
+ *s++ = 0;
+
+ *s++ = 0;
+ }
else
{
/* We wrapped -- try to back up to the previous word boundary. */
else
{
/* We wrapped -- try to back up to the previous word boundary. */